From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 04:41:29 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D77D716A4BF for ; Wed, 3 Sep 2003 04:41:29 -0700 (PDT) Received: from Danovitsch.dnsq.org (b74143.upc-b.chello.nl [212.83.74.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id A14D443FA3 for ; Wed, 3 Sep 2003 04:41:27 -0700 (PDT) (envelope-from Danovitsch@Vitsch.net) Received: from FreeBSD.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Danovitsch.dnsq.org (8.12.3p2/8.11.3) with ESMTP id h83BYuqr067934; Wed, 3 Sep 2003 13:34:56 +0200 (CEST) (envelope-from Danovitsch@Vitsch.net) Content-Type: text/plain; charset="iso-8859-1" From: "Daan Vreeken [PA4DAN]" To: "Charles Howse" Date: Wed, 3 Sep 2003 13:41:44 +0200 User-Agent: KMail/1.4.3 References: <003101c3720d$a43d54d0$04fea8c0@moe> In-Reply-To: <003101c3720d$a43d54d0$04fea8c0@moe> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200309031341.44678.Danovitsch@Vitsch.net> cc: FreeBSD-questions@FreeBSD.org Subject: Re: Tar question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2003 11:41:30 -0000 On Wednesday 03 September 2003 13:22, Charles Howse wrote: > I'm a little confused about the arguments for tar. > I want to tar the contents of a directory and save that .tgz file for > backup purposes. > > Problem is, when I copy larry.tgz to /disk2 and: > Tar xvfz larry.tgz > It creates the /disk2 file structure within /disk2. > > # cd > # ls /disk2 > # freebsd larry (directories) > # tar cvfz larry.tgz /disk2 > # cp larry.tgz /disk2 > # cd /disk2 > # tar xvfz larry.tgz > # ls > # freebsd larry disk2 (directories) > > How can I make tar not create the directory structure within the same > directory? > Does that make sense? What about : cd /disk2 tar -cvfz larry.tgz * grtz, Daan