Linux System Administration
Intermediate Commands
grep
grep prints the lines from a file or input stream that match an expression.
grep sshd /var/log/messages
This command will look for the phrase sshd in the file /var/log/messages
You can use regular expressions with
grep
.
grep options:
grep -i
--> case-insensitive matches
grep -v
--> inverts search; shows lines that don't match.
see the man pages for more options.
Prev
Page 3
Next