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.

Post By Editor (2,827 Posts)

Website: →