Jeff McCune home
TerminalI've been using the find command for over a decade now, and I'm ashamed to say I never really learned how to properly exclude directories. Dealing with with subversion working copies that litter ".svn" folders everywhere, I finally sorted it all out this afternoon. To exclude ".svn" folders and all contents:
$ find . '!' '(' -name '.svn' -prune ')'
This, combined with find -print0 and xargs -0 to execute arbitrary commands on every filesystem object found is a wonderful tool to keep handy.
Fork me on GitHub