This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Re:How do ya find omitting certain dirs..

Posted by: Anonymous Coward on July 14, 2006 08:30 AM
From the man page:
<tt>       ...To ignore a whole directory tree,  use  -prune  rather
than  checking every file in the tree.  For example, to skip the
directory `src/emacs' and all files and  directories  under  it,
and  print the names of the other files found, do something like
    find . -path './src/emacs' -prune -o -print</tt>

You can omit multiple directories like this:
<tt>find . -path './a' -prune -o -path './b' -prune -o -print</tt>


Return to CLI Magic: Searching with find