mac find exclude a directory 1

mac find exclude a directory

find ~/App/Classes/ -type f -name "*.m"  -not -path "./Lib/excludethisdir/*"

Here is what the above code is Doing:
1. find all files in the current directory and subdirectories
2. that have the .m extension
3. that are not in the ./Lib/excludethisdir/ directory
4. and print the full path to each file

Similar Posts