Date: Sun, 05 Jan 1997 15:27:11 -0500 From: Troy Settle <pitlord@usit.net> To: michael dorin <mike@chaski.com> Cc: questions@freebsd.org Subject: Re: tar or gzip or both? Message-ID: <32D00E9F.469A@usit.net> References: <199701051729.LAA16259@chaski.com>
next in thread | previous in thread | raw e-mail | index | archive | help
michael dorin wrote: > > I would like to make periodic backups of my /home directories and a > couple other really important ones on to a second hard drive. > I would like these in nice neat packages, kind of like you could > do with pkzip. > > How can I use tar and gzip to get a whole tree? > > Thanks for the information... > > -Mike > > http://www.chaski.com/wwwboards/freebsd I've only been following the _questions_ list for a short time, but aren't man pages pretty much mandatory reading before posting? by reading the man page for your shell, gzip, and tar, you should be able to come up with any of the following: tar cf home.tar /home gzip home.tar or: gzip -c > home.tar.gz < tar cf - /home or even: tar cf - home > gzip -c > home.tar.gz or the *easy* way, provided by 'man tar' by itself tar zcf home.tar.gz /home I'm sure their's several other ways of doing this, but I'm not sitting at a unix box right now. Have fun with it all Troy P.S. If you want to see what's going on, add the 'v' flag to tar, and it'll show you names for each file it handles.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32D00E9F.469A>