linux find word in files code example
Example 1: find text in folder
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: how to find a word in files linux
# this will search all subdirectories for text (no case sensitivity)
grep -inR "your text" .
Example 3: linux find file containing text
# syntax
# find *</path/to/dir> -name '*<file(s)-to-search>' -exec grep '*<string-to-find>' {} /dev/null \;
# example
find 'C:/Users/JacquesK' -name '*.*' -exec grep 'Random text to find' {} /dev/null \;