Remember this: find recursion

I keep forgetting. To limit find’s recursion, use:

find . -maxdepth X

Where X is the recursion number. Maxdepth must be before any search selection stuff (type, name, mtime, perm etc).

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>