How to grep from a GZ file on Linux System

There are few ways by which you can grep from GZ files on Linux .The best way is to use the zgrep command as follows

 zgrep -c "post-classifieds-ads HTTP/1.1" access_log.11.gz

In the above example i used the grep command on access_log.gz file to get the count of post-classifieds-ads in that file.


One Response to “How to grep from a GZ file on Linux System”


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>