h1

Compressing/Decompressing files in Linux

July 7, 2007

The first thing that we must know, it’s to Compress/Decompress we need some applications, like “unzip” or “unrar”. All of them can be installed using “apt-get” or downloading it from their respective project pages. To find them, can use google :P.

But, to compress/decompress we’ll use some commands. I did this table with any (the most important, i think) u/d commands.

.tar.gz (Tar + Gzip)

Pack and compress tar czvf file.tar.gz /folder1/subfolder/*
Unpack and decompress tar xzvf file.tar.gz
To view data tar tzvf file.tar.gz

.tar (Tar)

Pack and compress tar cvf file.tar / folder1/ subfolder /*
Unpack and decompress tar xvf file.tar
To view data ttar tvf file.tar

.bz2 (Bzip2)

Compress bzip2 file
Decompress bzip2 -d file.bz2

.zip (Zip)

Compress zip file.zip /folder1/subfolder
Decompress unzip file.zip
To view data unzip -v file.zip

.rar (Rar)

Compress rar -a file.rar /folder1/subfolder
Decompress rar -x file.rar
To view data rar -v file.rar
Advertisements

One comment

  1. Thanks for providing all compressing and uncompressing commands at a single place. They are pretty useful.I appreciate that.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: