From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 04:22: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 C901616A4BF for ; Wed, 3 Sep 2003 04:22:29 -0700 (PDT) Received: from remt20.cluster1.charter.net (remt20.cluster1.charter.net [209.225.8.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9831B43F75 for ; Wed, 3 Sep 2003 04:22:28 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt20.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 144714036 for freebsd-questions@freebsd.org; Wed, 03 Sep 2003 07:22:26 -0400 From: "Charles Howse" To: Date: Wed, 3 Sep 2003 06:22:20 -0500 Message-ID: <003101c3720d$a43d54d0$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: 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:22:29 -0000 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? I tried tar cvfzP, no joy. Man tar didn't have anything that jumped out at me, but I could have missed or misunderstood something. If the solution is in the man page, I would appreciate a reference to the section, so I can re-read it to understand. Thanks, Charles