Re: RFC: "-contains" option

2009-02-21 Thread Eddie Kohler
James Youngman wrote: On Sat, Feb 21, 2009 at 10:23 PM, Eddie Kohler wrote: exclude=$(find . -name .find-ignore -printf '%h\n' | sort -u); find . \! \( -false $(for e in $exclude ; do printf ' -o -name "%s" ' $e; done) \) , -true > /dev/null => 3.06s

Re: RFC: "-contains" option

2009-02-21 Thread Eddie Kohler
James Youngman wrote: exclude=$(find . -name .find-ignore -printf '%h\n' | sort -u) find . \! \( -false $( for e in $exclude ; do printf ' -o -name "%s" ' $e; done) \) It's about twice as slow as -contains -- as you might expect, since it traverses the directory structure twice. find . -type d

RFC: "-contains" option

2009-02-21 Thread Eddie Kohler
" takes 98.53s. The patch below adds a "-contains NAME" test to find. The test is true if the current filename is a directory, and that directory contains a file named NAME. I wonder if it is worth including, or if anyone has comments. (The patch doesn't yet update the texinf