Ubuntu Compress File

How to compress files in zip, gzip and bzip2

Zip

Deflate/Compress

zip -r filename.zip folder_and_files_within

Inflate/Decompress

unzip filename.zip

Gzip

Deflate/Compress

tar -czvf filename.tar.gz folder_and_files_within

Inflate/Decompress

tar -xzvf filename.tar.gz

Bzip2

Deflate/Compress

tar -cjvf filename.tar.bz2 folder_and_files_within

Inflate/Decompress

tar -xjvf filename.tar.bz2

< Back to all the stories I had written

Written by

A software engineer, a rock climbing, diving & rollerblading enthusiast, a husband, a father.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store