search word in file in linux code example
Example 1: find text in any file linux
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: how to search for a word in all files in a directory in linux
# this will search all subdirectories for text (no case sensitivity)
grep -inR "your text" .