|
CentOS Linux Server Guide |
Finding character strings in CentOS Linux |
|||||||||||||||||
grep command is used to search or given character in files.
Command and Options: grep [options] pattern filename(s)
Option:
Examples:
The following example "fail" string in error.log. If matched, it will output all matched line to screen
The following example,will display 2 lines of leading and trailing context arounf the matched lines
The following example will display total count of matched lines
|
|||||||||||||||||
|
Copyright 2011 http://www.1a-centosserver.com All Rights Reserved All trademarks are the property of their respective owners. Contact Us | Terms of Use | Privacy Policy |