How can I more easily find matches in the output of grep?

Updated -

grep is a useful command that searches files or input streams and displays lines matching conditions given by the user. For example, the following command displays all lines in /var/log/messages containing "cman":

grep cman /var/log/messages

When there are many matches, however, it can be difficult to find the requested text in the search results...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content