Comparison of (zip,gzip,bzip2 & tar)

This is a very small article but very useful for interview point of view. Four types of common compress methods are available in linux zip,gzip,bzip2 & tar commands. To decompresses the compressed file use unzip,gunzip,bunzip2 & tar commands.

Command Description
zip [.zip file name] [file to be compress] zip” is one of the compression method in linux. It compresses the normal file and stores in single zip file view more
gzip [file name] gzip” is one of the compression method in linux. It compresses the normal file and stores in single .gz extension file, this compression is much better compared to zip compression view more
bzip2 [file name] bzip2” is one of the compression method in linux, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available technique (the PPM family of statistical compressors) It compresses the normal file and stores in single .bz2 extension file, this compression is much better compared to gzip compression view more
tar -cvf [.tar file name] [list of files to be archive] “tar” is not a compressed files, it is a collection of files within a single file uncompressed. If you want to compress the “tar” file use gzip or bzip2 with tar. view more

Hope this article was useful for you. Kindly provide your valuable feedback/comments in the commenting section.

Stay tuned with us !!

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

Shares
Close
Please support the site
By clicking any of these buttons you help our site to get better