Monday, July 11, 2016

excluding .svn .git files from find command

# find . -type d '(' -name .git -o -name vendor ')' -prune -o -type f

Note: Using -prune to avoid recursing into .svn and .git directories is better than using a regex.

Reference:

http://stackoverflow.com/questions/15883563/excluding-svn-git-files-from-findxargsgrep-pipe

No comments: