Date: Thu, 20 May 2010 06:06:48 +0000 From: "b. f." <bf1783@googlemail.com> To: Tim Kientzle <kientzle@freebsd.org> Cc: Martin McCormick <martin@dc.cis.okstate.edu>, freebsd-questions@freebsd.org Subject: Re: tar and --include Message-ID: <AANLkTim0NC8_qegwARES7ddqAQ5ZMJmPz3N2zTPXsA2P@mail.gmail.com> In-Reply-To: <4BF4CC14.3030809@freebsd.org> References: <AANLkTilrvL7wDdpGdyT1YZjrai_f2Se024tBGWr0Bcn7@mail.gmail.com> <4BF4CC14.3030809@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/20/10, Tim Kientzle <kientzle@freebsd.org> wrote: > b. f. wrote: >> Martin McCormick wrote: >>> What I discovered was that --include doesn't appear to >>> do anything at all. The example in the man page shows using it >>> to filter an existing archive ... I never >>> tried that since that is not what was needed here. > > The --include directive was designed to support the > case of filtering an existing archive. GNU tar has > no equivalent to bsdtar's @archive feature and hence > has no real need for --include. > ... > >> There certainly seems to be a bug here, either in the documentation or >> the implementation. The example you mention works as expected for me >> on 9-CURRENT, but the --include option fails on, for example: >> >> tar -cvf new.tar --include='baz' foo/bar > > In your example here, the first item > tar inspects is "foo/bar", which does not match > the pattern and therefore is not included. > Excluding a directory excludes everything > in the directory. > > The net result is the same as if you had specified: > tar -cvf new.tar --exclude='foo/bar' foo/bar tar(1) states "The --include option is especially useful when filtering archives." If I understand your comments correctly, this statement should be changed to state that the option is, in fact, _only_ useful when filtering archives. The current description of the option is misleading. b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim0NC8_qegwARES7ddqAQ5ZMJmPz3N2zTPXsA2P>