how to search all files in a directory for a string code example Example: find text in any file linux grep -rnw '/path/to/somewhere/' -e 'pattern'