linux search directory for string code example
Example 1: find text in folder
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: search a folder in linux
$ locate --basename '\pkg'
Example 3: linux find file containing text
find 'C:/Users/JacquesK' -name '*.*' -exec grep 'Random text to find' {} /dev/null \;
Example 4: find text in linux file
grep 'word' filename
grep 'word' file1 file2 file3
grep 'string1 string2' filename
cat otherfile | grep 'something'
command | grep 'something'
command option1 | grep 'data'
grep --color 'data' fileName