search for string in files on directory linux code example
Example 1: find string in files linux
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: linux find all files name containing string
find . -name "*ABC*" -exec grep -H 'XYZ' {} +
grep -rnw '/path/to/somewhere/' -e 'pattern'
find . -name "*ABC*" -exec grep -H 'XYZ' {} +