P
postcd
Hello,
im making an bash script
and my aim is to backup:
Quote:
f /usr/local/ddos/ddos.conf
f /etc/fail2ban/jail.conf
f /nodewatch/scripts/nodewatch_config.php
d /etc/yum.repos.d
d /etc/pki/rpm-gpg/
i know i can do it using:
Code:
tar czf archive.tar.gz filepath1 filepath2 folderpath3
BUT i dont know how can i extract it easilly using one command into its pathes back?
Code:
tar xzf archive.tar.gz -C /destination/path/
should extract it? but it puts wrongly all files into one directory, setting path to / i would quess wont work?
Continue reading...
im making an bash script
and my aim is to backup:
Quote:
f /usr/local/ddos/ddos.conf
f /etc/fail2ban/jail.conf
f /nodewatch/scripts/nodewatch_config.php
d /etc/yum.repos.d
d /etc/pki/rpm-gpg/
i know i can do it using:
Code:
tar czf archive.tar.gz filepath1 filepath2 folderpath3
BUT i dont know how can i extract it easilly using one command into its pathes back?
Code:
tar xzf archive.tar.gz -C /destination/path/
should extract it? but it puts wrongly all files into one directory, setting path to / i would quess wont work?
Continue reading...