Source: http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-in-linux
Do the following:
grep -rnw 'directory' -e "pattern"
-r
is recursive, -n
is line number and -w
stands match the whole word. Along with these, --exclude
or --include
parameter could be used for efficient searching. Something like below: