linux find text in files recursively code example
Example 1: find text in folder
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" *
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 \;