tar
Package $ tar cvf files.tar /path/files/pack/*
Unpack $ tar xvf files.tar
View the content (without removing): $ tar tvf files.tar
.tar.gz - .tar.Z - .tgz (tar with gzip)
Package and compress: $ tar czvf archive.tar.gz /path/files2/pack/*
Unpack and decompress: $ tar xzvf archive.tar.gz
View the content (without removing): $ tar tzvf archive.tar.gz
.gz (gzip)
Compress: $ gzip -q file [
the file is compressed and renames it "file.gz"]
Decompress: $ gzip -d file.gz [
The file decompresses it and leave it as "file"]
.bz2 (bzip2)
Compress: compresses file and renames it "file.bz2".
$ bzip2 file
$ bunzip2 file
Decompress: The file decompresses it and leave it as "file" .
$ bzip2 -d file.bz2
$ bunzip2 file.bz2
NOTE: gzip or bzip2 only compress files [no folder, for this propuese you can use tar].
.tar.bz2 (tar with bzip2)
Compress: $ tar -c file | bzip2> archive.tar.bz2
Decompress: $ bzip2 -dc archive.tar.bz2 | -xv tar
$ tar jvxf archive.tar.bz2 (recent versions of tar)
View content: $ bzip2 -dc archive.tar.bz2 | tar -tv
Zip (zip)
Compress: $ file.zip zip /path/files2/pack/*
Decompress: $ unzip file.zip
View content: $ unzip -v file.zip
.lha (lha)
Compress: $ lha files.lha /path/files2/pack/*
Decompress: $ lha -x files.lha
View content: $ lha -v files.lha
$ lha -k files.lha
.zoo (zoo)
Compress: $ zoo -a files.zoo /path/files2/pack/*
Decompress: $ zoo -x archivo.zoo
View content: $ zoo -v files.zoo
$ zoo -L files.zoo
.rar (rar)
Compress: $ rar -a files.rar
/path/files2/pack/*
Decompress: $rar -x files.rar
View content: $ rar -v files.rar
$ rar -l fiels.rar