How to find the files recursively having a text pattern excluding some directories and files?
Example:-
$ ls
bower.json bower_components configure results unit-tests
so I need to find "searchText" recursively in all directories excluding bower.json and results
Short grep solution:
grep -r --exclude="bower.json" --exclude-dir="results" "searchText"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With