linux find content of file code example
Example 1: 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 \;
Example 2: grep for all .py files containing a word
grep -rnw '/path/to/somewhere/' -e 'pattern'