find_list_entry.c and "FNM_LEADING_DIR"?

Robert P. J. Day rpjday at mindspring.com
Mon Apr 17 12:38:35 UTC 2006


On Mon, 17 Apr 2006, Robert P. J. Day wrote:

> On Tue, 18 Apr 2006, Glenn L. McGrath wrote:
>
> > On Sun, 16 Apr 2006 17:07:26 -0400 (EDT)
> > "Robert P. J. Day" <rpjday at mindspring.com> wrote:
> >
> > > all right, but this just leads us back to the original question --
> > > what are the precise semantics of the "--exclude" option?  does
> > > anyone have a clear and unambiguous answer for that?
> >
> > whatever GNU tar does, refer to the info page.
>
>   i *have* checked the info page for GNU tar and it's not perfectly
> clear what the semantics should be.  the info page says that the
> "--exclude" option takes a (hopefully quoted) wildcard pattern as an
> argument.  ok, i understand wildcard patterns so i ran a bunch of
> tests.
>
>   i have a small (gzipped) tarball whose contents include a small,
> top-level "etc/" directory, listed:
>
>   ...
>   ./etc/
>   ./etc/file1
>   ./etc/file2
>   ... etc etc ...
>
> so say i wanted to extract the contents of that tarball while
> (recursively) excluding the entire "etc" directory.  using GNU tar,
> here's what happened with various --exclude option values:
>
>   etc		excluded
>   ./etc	excluded
>   etc/	NOT excluded
>   ./etc/	NOT excluded
>   etc/*	empty directory etc created
>   ./etc/*	as above
>   etc*	excluded
>   ./etc*	excluded

FYI, the one variation that appears to work equally well under BB tar
for recursively excluding an entire directory is "./etc*".  so, for
now, i can just change the exclude pattern i'm using slightly to get
it to work properly under BB tar.  but it would still be nice to
settle this compatibility issue.

rday



More information about the busybox mailing list