Skip to content

Glossary: Security Monitoring and Automation

grep

Also written: grep -c, grep -q, grep -o, grep -E, grep -qxF

A command that finds the lines of text that match a pattern, used to search and count log entries. Useful options include `-c` to count matches, `-q` to print nothing and only set the exit status, `-o` to print only the matched text, and `-x -F` to match a whole line as plain text.

Where the book teaches it

Related terms

awkregular expression