Recursively search inside files for a string

Use grep!

$ cd 
$ grep -rnw . -e "the string I'm looking for"

Recursively search only in PHP and HTML files, but ignore java and object files

$ grep --exclude=*.{java,o} --include=\*.{php,html} -rnw . -e "the string I'm looking for"
Tagged with: , , , , ,

Leave a Reply