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

Your email address will not be published. Required fields are marked *

comptrollership-ruddily