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:
gunzip file-name.gzwhere I assume that the full name of the file is file-name.gz
gzip file-nameThis will create a file called file-name.gz You can decompress it (retore it to its original form) with gunzip
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.
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
tar tvf file-name.tar
tar ztvf file-name.tgz
tar jtvf file-name.tar.bz2
tar xvf file-name.tar
tar zxvf file-name.tgz
tar zxvf file-name.tar.bz2
tar kxvf file-name.tar
tar kzxvf file-name.tgz
tar kjxvf file-name.tar.bz2
tar cvf file-name.tar file1 file2 .... filen dir1 dir2 ... dirmYou can compress later the tar file with gzip or bzip2
This is similar to tar files, in the sense that a zip file is a collection of files put together. Here are the commands.
unzip -l file-name.zip
zip file-name.zip file1 file2 ... filen