grep search a whole directory for text code example
Example 1: grep search text in folder
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: grep search for string in directory
grep -nr 'yourString*' .
grep -rnw '/path/to/somewhere/' -e 'pattern'
grep -nr 'yourString*' .