Zip and unzip on Linux .Zip, .Rar, .Gz, .bz2, .Bzip2, .Lha, .Arj, .Zoo


linux

.Tar files

tar packs multiple files into one, but does not compress.

  • Install the tool: # emerge -n tar

  • Package: # tar cf archive.tar files

  • Unpack: # tar -xvf file.tar

  • See content: # tar -tf file.tar

.Gz files

gzip it only compresses file by file, does not pack several files into one or compress directories.

  • Install the tool: # emerge -n gzip

  • Compress: # gzip file

  • Decompress: # gzip -d file.gz

.Bz2 files

bzip2 it only compresses file by file, does not pack several files into one or compress directories.

  • Install the tool: # emerge -n bzip2

  • Compress: # bzip2 file

  • Decompress: # bzip2 -d file.bz2

To compress several files and archive them into one, in the style of compressors zip or rar you have to combine tarwith gzip or with bzip2 as I show below.

.Tar.gz files

  • Compress: # tar -czf archive.tar.gz files

  • Decompress: # tar -xvzf file.tar.gz

  • See content: # tar -tzf file.tar.gz

.Tar.bz2 files

  • Compress: # tar -c files | bzip2> file.tar.bz2

  • Decompress: # bzip2 -dc file.tar.bz2 | tar -xv

  • See content: # bzip2 -dc file.tar.bz2 | tar -t

.Zip files

  • Install tools: # emerge -n zip unzip

  • Compress: # zip archive.zip files

  • Decompress: # unzip file.zip

  • See content: # unzip -v file.zip

.Rar files

  • Install the tool: # emerge -n rar

  • Compress: # rar to archive.rar files

  • Decompress: # rar x file.rar

  • See content: # rar l file.rar or # rar v file.rar

.Lha files

  • Install the tool: # emerge -n lha

  • Compress: # lha to file.lha files

  • Decompress: # lha x file.lha

  • See content: # lha v file.lha or # lha l file.lha

.Arj files

  • Install tools: # emerge -n arj unarj

  • Compress: # arj to archive.arj files

  • Decompress: # unarj file.arj or # arj x file.arj

  • See content: # arj v file.arj or # arj l file.arj

.Zoo files

  • Install the tool: # emerge -n zoo

  • Compress: # zoo to archive.zoo files

  • Decompress: # zoo x file.zoo

  • See content: # zoo L file.zoo or # zoo v file.zoo

Fountain:

http://unidadlocal.com/

Previous How to configure a Domain Name Server (DNS) (BIND).
Next How to configure a DHCP server on a LAN in Linux

No Comment

Leave a reply

Your email address will not be published. Required fields are marked *