Knowledgebase: CentOS Questions
How to search a file.
Posted by admin on 11 September 2009 11:01 PM
|
|
In order to search a file for a specific string, or pattern, use the following command: # grep search_string file Please note: You can also search the output of a command for a specific pattern by using the following command: # command | grep search_string | |
|
Comments (0)