[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
--exclude with directory difficulty
From: |
Scott Williams |
Subject: |
--exclude with directory difficulty |
Date: |
Mon, 14 Jan 2002 19:20:49 -0800 |
Perhaps this is more of a plea for help rather than a bug report, but
I'm having trouble getting the --exclude switch to work with
directories (ie, arg contains a slash).
I'm using Slackware Linux 8.0 and the OS installed version of tar (1.13).
When I try
tar-1.13/src/tar --verbose --create --file=/dev/null --exclude='test' dir
it seems to work OK, excluding subdir/test from the listing. But
tar-1.13/src/tar --verbose --create --file=/dev/null --exclude='subdir/test'
dir
still includes subdir/test in the listing.
I tried rebuilding tar from sources and notice that it uses the Linux
built-in fnmatch rather than the one that comes with tar.
So my question is: is there some special special escape I can use on
the `/' in the pattern to get it to match against the directory and
filename that tar finds?
Sorry for the bother if this is an obvious one, but I've spent a
couple of hours on this. Also, it's troublesome that the matching
behavior seems to change with different operating systems. Would it
be better to use the fnmatch that comes with tar in all cases? I
realize this is fairly mature software here, so I'm probably doing
something wrong here, but can't figure out what.
- Thanks,
Scott Williams
- --exclude with directory difficulty,
Scott Williams <=