Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> commands >> grep >> how to use grep to search for a keyword and display the filename, line number and the matching line text

Example

# grep -Hin ServerName /etc/httpd/conf/httpd.conf 
/etc/httpd/conf/httpd.conf:89:# ServerName gives the name and port that the server uses to identify itself.
/etc/httpd/conf/httpd.conf:95:#ServerName www.example.com:80
/etc/httpd/conf/httpd.conf:96:ServerName testweb.ourexample.com

 

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]