Keith Watanabe * NET 2.0

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.

Tags: UNIX Linux
AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

No Comments Posted Yet
October [November] December
Sun Mon Tue Wed Thu Fri Sat
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6