Linux grep command cheat sheet

The grep command is a way to search through a file for a specific pattern of characters.

If you're learning grep, or you just find yourself using it often and resorting to searching through its info pages, you'll do yourself a favor by downloading our cheat sheet for it. The cheat sheet uses short options (-v instead of --invert-matching, for instance) as a way to get you familiar with common grep shorthand. It also contains a regex section to help you remember the most common regex codes.