From owner-freebsd-questions Sun Jan 5 12:15:24 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id MAA12288 for questions-outgoing; Sun, 5 Jan 1997 12:15:24 -0800 (PST) Received: from smtest.usit.net (smtest.usit.net [199.1.48.16]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id MAA12277 for ; Sun, 5 Jan 1997 12:15:07 -0800 (PST) Received: from abyss ([206.29.54.13]) by smtest.usit.net (8.7.5/8.6.12) with SMTP id PAA24116; Sun, 5 Jan 1997 15:24:06 -0500 (EST) Message-ID: <32D00E9F.469A@usit.net> Date: Sun, 05 Jan 1997 15:27:11 -0500 From: Troy Settle Reply-To: pitlord@usit.net X-Mailer: Mozilla 3.01 (WinNT; I) MIME-Version: 1.0 To: michael dorin CC: questions@freebsd.org Subject: Re: tar or gzip or both? References: <199701051729.LAA16259@chaski.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.