Searching, viewing and manipulating compressed files
When dealing with compressed files, do you find it tedious to first uncompress to a temporary location before searching/viewing them (for example, when looking at archived log files)?
There exists a family of commands starting with the letter 'z' which can operate directly on compressed files, e.g. zcat
, zdiff
and zgrep
in the same way that their namesakes operate on non-compressed files.
e.g. to search for "xyz" in a compressed file:
$ zgrep xyz file.gz
Written by Jon
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Command line
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#