grep is a command-line utility for searching plain-text data sets for lines that match a regular expression.
There are hundreds of example and tutorial sites for
grep if you use your favorite search engine
As an example, if I wanted to get all the lines in the /var/log/apache2/access_log that contained the string "mod.php?mod=downloads" , I could use a command like:
Code:
grep "mod.php?mod=downloads" /var/log/apache2/access_log
This would output in my terminal potentially many lines of code, so I might pipe the output to a file instead eg
Code:
grep "mod.php?mod=downloads" /var/log/apache2/access_log > myfile
then I can open or download
myfile and deal with it at leisure
