How do I grep a specific word in Linux?

How do I grep a specific word in Linux?
Answer
To search /etc/passwd file for the user harry, enter the following command. If you want to search for a word, and avoid matching substrings use ‘-w ‘option. Just doing a normal search will show all the lines. The following example is the regular grep where it is searching for “is”.
 

Tìm kiếm

Back
Top