On Sat, Feb 21, 2009 at 10:23 PM, Eddie Kohler <[email protected]> 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
There is a -prune missing from both find expressions there I think. The first can be pruned because once we find a .find-ignore file we don't need to search for more .find-ignore files in subdirectories. The second needs a -prune because that's the point of putting the .find-ignore file there. > 3.06s is much much much better than -execdir; but -contains is still > easier to type :) It's fair to say I think that my concern around -contains has to do with the fact that it seems to be an extra feature designed for only one use case. I avoid adding new features which only have limited or special-case uses. Can you think of a more generally useful (i.e. more generic) feature which might also lend itself to your problem? James.
