From owner-freebsd-questions Fri Dec 31 14:33:16 1999 Delivered-To: freebsd-questions@freebsd.org Received: from orion.ac.hmc.edu (Orion.AC.HMC.Edu [134.173.32.20]) by hub.freebsd.org (Postfix) with ESMTP id F052D14A0A for ; Fri, 31 Dec 1999 14:33:14 -0800 (PST) (envelope-from brdavis@orion.ac.hmc.edu) Received: (from brdavis@localhost) by orion.ac.hmc.edu (8.8.8/8.8.8) id OAA25905; Fri, 31 Dec 1999 14:33:10 -0800 (PST) Date: Fri, 31 Dec 1999 14:33:10 -0800 From: Brooks Davis To: Joss Roots Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How to tar and gzip a directory Message-ID: <19991231143310.A25829@orion.ac.hmc.edu> References: <19991231222349.5436.qmail@web109.yahoomail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <19991231222349.5436.qmail@web109.yahoomail.com>; from osiris2002@yahoo.com on Fri, Dec 31, 1999 at 02:23:49PM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Dec 31, 1999 at 02:23:49PM -0800, Joss Roots wrote: > hi all, > I was doing some backup, and I am using > tar to gather the whole directory into one > big .tar file, then run gzip on that .tar > to produce a tar.gz file. > > I know it is possible to do that as one step > by using the pipe, but not sure of the exact > command line, I appreciate giving me a hint. Don't do it with a pipe, just use the z option to tar (or save your self some more space and use the y option to bzip2 the output). If you really wanted to do it with pipes you could do: tar cf - dir | gzip > blah.tar.gz -- Brooks -- "Those who desire to give up freedom in order to gain security, will not have, nor do they deserve, either one" --Thomas Jefferson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message