Search and view gzip’d files

You knew it already – but I keep forgetting – the power of zgrep and zcat both of which behave as their z-less counterparts.

So, to search a gzip’d file, you can simply zgrep <term> <filename.gz>, or to cat/view it, zcat <filename.gz>

Good to come back to in case of impending forgetfulness…

Leave a Reply

Your email address will not be published. Required fields are marked *

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