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: Bob Proulx
Subject: Re: find . -path '*/.gork' -prune -o -type f : prints ".gork"
Date: Fri, 3 Nov 2000 16:49:08 -0700 (MST)

>    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)?

Perhaps you could try using an explicit -print argument.  The -print
is a default if you don't specify it.  If you do specify it then it
applies exactly as you asked for it.  This is relatively new
functionality for find which in the past has not made that assumption
and would print nothing at all unless you specifically asked for it.
There might be dragons in the area of defaulting to printing.  Better
to be explicit.

  find . -path '*/.gork' -prune -o -type f -print

Bob



reply via email to

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