grep recursively search for string in files code example
Example 1: find text pattern in file linux
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: grep all files recursively
grep -r "texthere" .
grep -rnw '/path/to/somewhere/' -e 'pattern'
grep -r "texthere" .