Grep Gzipped Log Files

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

If you need to grep through some archived log files in gz format - don’t be extracting them and then using grep to search, just use zgrep to grep them directly.


zgrep 'my_search_string' access_log.processed.1.gz > zgrep_results && less zgrep_results

Tags: zgrep grep gz gzipped linux log files archived search