Tar/Gziping in a single line
By: Keith Watanabe
Published On: 5-11-2004
tar -cvf - $DIR | gzip -c > $compressedfile.tar.gz if you're doing this from a script rather than command line, you have to note that you'll need to change directories into parent directory of the directory you want to tar up. For instance: cd /home/mydir; /usr/bin/tar -cvf - important_dir | gzip -c > important_dir.tar.gz In this case, you can put something like this into crontab if you need to do a nightly backup.
Post Comment
Trackbacks: (Trackback URL)
No Comments Posted Yet