command line how to find all files that have a string

Shell
grep -rnw '/path/to/somewhere/' -e 'pattern'
Source

Also in Shell: