grep command, like
find, is an incredibly powerful search tool in the right hands. Unlike
grep processes any text, whether in files, or just in standard input.
The basic usage of
grep is this:
matthew@seymour:~$ grep "some text" *
That searches all files in the current directory (but not subdirectories) for the string
some text and prints matching lines along with the name of the file. To enable recursive searching in subdirectories, use the
-r parameter, as follows:
matthew@seymour:~$ grep -r "some text" *
Each time a string is matched within a file, the filename and the match are printed. If a file contains multiple matches, ...