If you would like to find a specific string of text within a directory of files, you can use the following command and example:
user@host:~$ grep -rnw '/path/to/directory/' -e 'searchterm'
Here's a breakdown of the example command and its parameters:
-r
or -R
will recursively (within directories) look at all files within the specified path.-n
will display the line number where the term shows up within each file.-w
Matches the whole word.
~~DISCUSSION~~