bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find . -path '*/.gork' -prune -o -type f : prints ".gork"


From: Kevin Dalley
Subject: Re: find . -path '*/.gork' -prune -o -type f : prints ".gork"
Date: 05 Nov 2000 19:07:42 -0800
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

address@hidden (David M. Karr) writes:

> >>>>> "Bob" == Bob Proulx <address@hidden> writes:
>   >> find . -path '*/.gork' -prune -o -type f
>   >> 
>   >> I would expect it to just print "testdir/subdir/foo".  The "find" man
>   >> page gave me this impression in the description of the "-path"
>   >> option.  However, it also prints "testdir/.gork".  It didn't print
>   >> "testdir/.gork/stuff", but it did print the ".gork" directory entry.
>   >> How can I make "find" not even print the directory entry for ".gork"
>   >> (without piping it into a "grep -v" command)?
> 
>   Bob> Perhaps you could try using an explicit -print argument.  The -print
>   Bob> is a default if you don't specify it.  If you do specify it then it
>   Bob> applies exactly as you asked for it.  This is relatively new
>   Bob> functionality for find which in the past has not made that assumption
>   Bob> and would print nothing at all unless you specifically asked for it.
>   Bob> There might be dragons in the area of defaulting to printing.  Better
>   Bob> to be explicit.
> 
>   Bob>   find . -path '*/.gork' -prune -o -type f -print
> 
> This is really strange.  As you describe, without the "-print" on the
> end, it prints the directory name I wanted to skip.  With "-print" on
> the end, it doesn't print that directory.  That's the behavior that I
> want.  Is it possible to explain WHY it works this way without
> confusing me even more?


Sure, I'll give it a try.

There's a bug in the version of find which you are using.

Try the alpha release which is available in

ftp://alpha.gnu.org/gnu/findutils-4.1.6.tar.gz

It fixes a bug which looks a lot like the one you found.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]