Find
- Example 1: All in 1 command
find . -name "*.js" -not -path "*/node_modules/*" -type f -delete
- Example 2: Find file by exact name
find . -name file.ext
- Example 3: Find file but exclude folder from search
find . -name file.ext -not -path "*/node_modules/*"
- Example 4: Find all files that end in ".js"
find . -name "*.js"
- Example 5: Delete all files that end in ".js"
find . -name "*.js" -delete