grep find word in file code example
Example 1: find text in any file linux
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: linux search for a given string in all files recursively
$ grep -r "String to be searched goes here" *
grep -rnw '/path/to/somewhere/' -e 'pattern'
$ grep -r "String to be searched goes here" *