Compressed Howto

(How to compress and decompress files)

© (2004) Pablo Arés, pablo /at/ math.tifr.res.in

There are many different types of compression techniques for files. Below you have information on how to create, compress and decompress, files in different formats.

gzip

This is the alternative to zip from the GNU software. Files compressed in this format usually have names ending in .gz (or .tgz, see below under tar).
Here is what you have to do to compress or decompress a file with gzip:


bzip/bzip2

This is another compressing tool. Files compressed with this utility have names usually ending in .bz2 The commands are similar to the gzip commands above.


tar

In a informal way, a tar file is a collection of files put together in a singl file. The tar can be compressed as well. tar files have names ending in .tar, .tar.gz or .tgz (tar plus gzip) or .tar.bz (tar plus bzip2). The commands below will help you to handle tar files; I include the possibility of the file being compressed with gzip or bzip2 as well. For gzip compression I will write file-name.tgz but you can handle with the same commands files ending in tar.gz


zip

This is similar to tar files, in the sense that a zip file is a collection of files put together. Here are the commands.