First page Back Continue Last page Overview Graphics
The grep command
grep <pattern> <files>
Scans the given files and displays the lines which match the given pattern.
grep error *.log
Displays all the lines containing error in the *.log files
grep -i error *.log
Same, but case insensitive
grep -ri error .
Same, but recursively in all the files in . and its subdirectories
grep -v info *.log
Outputs all the lines in the files except those containing info.