Ubuntu Terminal: How to Quickly GZip a File CodeUnit 01 JUL 2010

File archiving is a particularly simple affair and there are quite a few different archive algorithms to pick and choose from. GZip (.gz) has for long been associated with Linux as one of its main archiving algorithms and so today’s quick command line tip highlights how to quickly create a zipped file on your system.

Simply enter the following to gzip your file:

gzip [filenameToZip] -c -v > [zippedFileName]

Conversly, to unzip a file is as simple as entering:

gunzip [zippedFileName] -c -v > [unzippedFileName]
Related Posts:

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more.

  • If you're gzip'ping a single file, gzip FILENAME will suffice, and FILENAME.gz will be outputted; gunzip FILENAME.gz or for that matter zcat FILENAME.gz will decompress the file in one go as FILENAME

  • So even simpler then – thanks Mr. Sven! :)