$unzip -v file.zipRar filesYou need the rar program from rarlabs.com to compress/decompress these files or you can use unrar or unrar-nonfree packages

$rar -a file.rar /folder/

to uncompress use

$rar -x file.rar

to view the data in the file use

$rar -v file.rar

Tar Filesto compress files into a tar archive use

$tar cvf file.tar folder/ *

to unpack or to uncompress us

$tar -xvf file.tar

to view data in the tar file use

$tar -tvf file

Here the 'v' is optional, it just gives verbose output

Tar.gz filesto compress into .tar.gz use

$tar czvf file.tar.gz folder

to uncompress use

$tar xzvf file.tar.gz

to view data in the tar.gz file use

tar tzvf file.tar.gzbz2 files to compress into bz2 format use bzip2

$bzip2 file

above command will create an archive named file.bz2. Also bz2 works on only files.So if you want to compress a folder you have to pack it into a tar file first and use bzip2 on it. to uncompress or unpack use