Documentation Reference Number: #0006
Grep
I. How To Recursively Search For A String
Explanation
The example provided below will recursively search (-r) all files which match the given regular expression (*) for the given string (html).
When a match is found, 3 lines of context from the matching file will be output (-C 3), the output lines will be numbered (-n) and the output will be highlighted in different colors (--color=always).
Example 1.1
Recursively searching through files for the string 'html'.john@comp:~$ grep --color=always -n -r -i -C 3 -e html *