Gentoo Archives: gentoo-user

From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] tar exclude syntax tip
Date: Wed, 05 May 2021 15:20:39
Message-Id: cc05f8bb-23fd-0cbf-1ab1-8c0e07637122@spamtrap.tnetconsulting.net
In Reply to: [gentoo-user] [OT] tar exclude syntax tip by Walter Dnes
1 On 5/5/21 7:33 AM, Walter Dnes wrote:
2 > 3) All directories and/or files to exclude must be listed as relative
3 > paths to the directory being tarred, i.e. last parameter on the
4 > command line.
5
6 This might not be very clearly articulated in the manual et al., but
7 once you are aware of it, you see evidence of it in multiple places.
8
9 I'm used to tar stripping the leading character if it's a forward slash
10 from paths. Thus tar actually works with relative paths based on the
11 (effective) working directory (which can be changed via the '-C' /
12 '--directory=' option).
13
14 So, after many years and even more battle scars, /I/ would /expect/ that
15 the path must be relative to the directory that tar is working on.
16 Perhaps I've simply survived more duels with tar. This is nothing
17 against you or anyone. After all, xkcd has this to say about tar: I'M
18 SO SORRY.
19
20 Link - TAR
21 - https://xkcd.com/1168/
22
23
24
25 --
26 Grant. . . .
27 unix || die