Do the following
grep -rnw '/path/to/somewhere/' -e "pattern"
-nis line number, and
-wstands match the whole word.
-l(lower-case L) can be added to just give the file name of matching files.
- Along with these,
--includeparameter could be used for efficient searching. Something like below: