Ubuntu Command Line Search

Sometimes I have to go through log files searching for a certain error message. The command below will show you log file names and lines where the message was recorded.

grep -rnw 'logs/' -e 'Hello World'

To learn more about “grep” command use the following link https://help.ubuntu.com/community/grep

Share this article

Similar Posts