From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2C2861382C5 for ; Wed, 5 May 2021 15:20:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECD09E087F; Wed, 5 May 2021 15:20:32 +0000 (UTC) Received: from tncsrv06.tnetconsulting.net (tncsrv06.tnetconsulting.net [IPv6:2600:3c00:e000:1e9::8849]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D785E07B3 for ; Wed, 5 May 2021 15:20:31 +0000 (UTC) Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 145FKUjr019579 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 5 May 2021 10:20:31 -0500 Subject: Re: [gentoo-user] [OT] tar exclude syntax tip To: gentoo-user@lists.gentoo.org References: From: Grant Taylor Organization: TNet Consulting Message-ID: Date: Wed, 5 May 2021 09:20:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Archives-Salt: b91f9ae2-1e1e-4f04-9223-68487b9671fa X-Archives-Hash: 768e371df4869edf5ba3d38e2803155c On 5/5/21 7:33 AM, Walter Dnes wrote: > 3) All directories and/or files to exclude must be listed as relative > paths to the directory being tarred, i.e. last parameter on the > command line. This might not be very clearly articulated in the manual et al., but once you are aware of it, you see evidence of it in multiple places. I'm used to tar stripping the leading character if it's a forward slash from paths. Thus tar actually works with relative paths based on the (effective) working directory (which can be changed via the '-C' / '--directory=' option). So, after many years and even more battle scars, /I/ would /expect/ that the path must be relative to the directory that tar is working on. Perhaps I've simply survived more duels with tar. This is nothing against you or anyone. After all, xkcd has this to say about tar: I'M SO SORRY. Link - TAR - https://xkcd.com/1168/ -- Grant. . . . unix || die