Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GNU diff 2.8.1 --exclude problems

0 views
Skip to first unread message

Tony Howat

unread,
Jan 21, 2004, 6:50:00 AM1/21/04
to
I think I may be going nuts, but I can't seem to get the --exclude
function of GNU diff to operate as I would expect :

[thowat@unixadmin2 thowat]$ diff -r
--exclude=/home/thowat/testdir/foo/* /home/thowat/testdir
/home/thowat/testdir2
Only in /home/thowat/testdir2/foo: other
[thowat@unixadmin2 thowat]$ diff -r --exclude=/home/thowat/testdir/foo
/home/thowat/testdir /home/thowat/testdir2
Only in /home/thowat/testdir2/foo: other


testdir:
total 8
-rw-rw-r-- 1 thowat thowat 4 Jan 21 11:39 file
drwxrwxr-x 2 thowat thowat 4096 Jan 21 11:39 foo

testdir/foo:
total 4
-rw-rw-r-- 1 thowat thowat 4 Jan 21 11:39 dog


testdir2:
total 8
-rw-rw-r-- 1 thowat thowat 4 Jan 21 11:39 file
drwxrwxr-x 2 thowat thowat 4096 Jan 21 11:40 foo

testdir2/foo:
total 8
-rw-rw-r-- 1 thowat thowat 4 Jan 21 11:39 dog
-rw-rw-r-- 1 thowat thowat 5 Jan 21 11:40 other


Now, I would expect the --exclude to prevent any results being given
for testdir/foo? Am I using this wrong? As you can see I've tried both
wildcarded and unwildcarded forms.

Perhaps it's time to just pack me off to the house on the hill for
regular cold baths and strong medication?

Help would be appreciated.

--
Tony
http://www.i-r-genius.com

Bill Marcum

unread,
Jan 21, 2004, 6:33:21 PM1/21/04
to
On 21 Jan 2004 03:50:00 -0800, Tony Howat
<xar...@eh.org> wrote:
>
> Now, I would expect the --exclude to prevent any results being given
> for testdir/foo? Am I using this wrong? As you can see I've tried both
> wildcarded and unwildcarded forms.
>
The shell expands the wildcard unless you use quotes.

--
Absurd Procrustean Egghead Cornstarch Variant Bill Marcum

0 new messages