Posts Tagged ‘gzip’

Search and view gzip’d files


2010
10.21

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…

On the fly compression of a tar-ball or mysqldump


2010
07.14

Just to jot it down lest I forget:

Tar’ing the local directory and streaming the tarball straight to gzip:

tar cvf - . | gzip > target.tar.gz

MySQLdump’ing directly to gzip: (more…)