From owner-freebsd-questions@FreeBSD.ORG Sun Feb 8 07:55:36 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C562BBE for ; Sun, 8 Feb 2015 07:55:36 +0000 (UTC) Received: from BLU004-OMC4S9.hotmail.com (blu004-omc4s9.hotmail.com [65.55.111.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 532AE869 for ; Sun, 8 Feb 2015 07:55:36 +0000 (UTC) Received: from BLU436-SMTP258 ([65.55.111.135]) by BLU004-OMC4S9.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Sat, 7 Feb 2015 23:53:24 -0800 X-TMN: [b2k9pl3Z+h9tOSIZCbp6O+5qsT4E3aI/] X-Originating-Email: [bourne.identity@hotmail.com] Message-ID: Date: Sun, 8 Feb 2015 13:23:12 +0530 From: Manish Jain User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "freeb >> User Questions" Subject: why does tar archive directory differently based on command line? X-Antivirus: avast! (VPS 150207-1, 07-02-2015), Outbound message X-Antivirus-Status: Clean X-OriginalArrivalTime: 08 Feb 2015 07:53:21.0921 (UTC) FILETIME=[4F493710:01D04374] Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 07:55:36 -0000 Hi, I am having problems trying to understand why does tar archive differently with the following 2 commands, presuming xyz is a sub-directory : tar -c -f - ./xyz | gzip > xyz.tar.gz//xyz nested one level under . and .. tar -c -f - xyz | gzip > xyz.tar.gz//no . or .. With the first invocation, I get a top-level nesting that just has . and .. With the second, I get a top-level nesting that has xyz, which is much preferable The first invocation leads to an absurdity that you have to cd into . (sounds recursively impossible) to actually get to xyz Thanks for any help. -- Regards, Manish Jain +91-98995-82709 --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com