From owner-freebsd-questions Wed Aug 22 13:40:50 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailf.telia.com (mailf.telia.com [194.22.194.25]) by hub.freebsd.org (Postfix) with ESMTP id 4C56537B412 for ; Wed, 22 Aug 2001 13:40:19 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailf.telia.com (8.11.2/8.11.0) with ESMTP id f7MKeIB24843 for ; Wed, 22 Aug 2001 22:40:18 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id WAA09636 for ; Wed, 22 Aug 2001 22:40:12 +0200 (CEST) Received: (qmail 56097 invoked by uid 1001); 22 Aug 2001 20:40:00 -0000 Date: Wed, 22 Aug 2001 22:40:00 +0200 From: Erik Trulsson To: Olivier Cortes Cc: m p , freebsd-questions@freebsd.org Subject: Re: How to untar a .tgz file Message-ID: <20010822224000.A56075@student.uu.se> Mail-Followup-To: Olivier Cortes , m p , freebsd-questions@freebsd.org References: <20010822150841.63108.qmail@web13302.mail.yahoo.com> <20010822174234.A37914@APastourelles-102-1-2-26.abo.wa> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010822174234.A37914@APastourelles-102-1-2-26.abo.wa> User-Agent: Mutt/1.3.20i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 22, 2001 at 05:42:34PM +0200, Olivier Cortes wrote: > On Wed, Aug 22, 2001 at 05:08:41PM +0200, m p wrote: > > It should be: > > > > tar -xzvf /file/to/untar.tgz /path/to/extract/to > > no, no. > this way your are trying to find the file "/path/to/extract/to" in the > archive and extract it in your current working dir. > > with gnu tar (gtar), you can use option -C /path to do what you want. > with bsd tar (the one aimed here), i don't know. i go in the good dir > before extracting ! FreeBSD uses the GNU version of tar (albeit an older and somewhat modified version) so the -C option works fine with FreeBSD too. So to unpack the contents of a gziped tar file into a specific directory the invocation could be: tar zxvf /file/to/unpack.tgz -C /destination/directory/ Or one could cd to the right directory and just do tar zxvf /path/to/file.tgz -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message