Recursive grep Use -r (recursive) and include/exclude to target files to grep grep --include=\*.js --exclude=\*.min.js -r . -e pattern