Friday, May 4, 2012

Compression & Uncompression on Linux

A Quick Reference for Command-line 
Creation and Extraction of Archives on Linux

.RAR

Compress

  • rar a  new-archive.rar  files/folders

Best Compression

  • rar a -m5  new-archive.rar  files/folders

Uncompress

  • rar x  archive.rar

.ZIP

Compress

  • zip -r  new-archive.zip  files/folders

Best Compression

  • zip -r -9  new-archive.zip  files/folders

Uncompress

  • unzip  archive.zip

.TAR

Compress

  • tar -cf  new-archive.tar  files/folders  

Uncompress

  • tar -xf archive.tar
for tar.gz   : specify '-z'  : -czf / -xzf
for tar.bz2 : specify '-j'   : -cjf / -xjf
for tar.xz   : specify '-J'  : -cJf / -xJf
or simply, let it detect from the archive's suffix : specify 'a' for auto-compression
  • e.g: tar -caf new-archive.tar.gz files/folder
for verbose : add '-v' anywhere before '-f'

.7z

Compress

  • 7za a  new-archive.7z  files/folders

Best Compression

  • 7za a -t7z -m0=lzma -mx=9 -mfb=64 -ms=on  new-archive.7z  files/folders 

Uncompress

  • 7za x  archive.7z



visit us at:

1 comment:

  1. oh yea, incredible. we sooo want to fulfill this person, he is an excellent create.

    fifa 14 coins
    lol boosting

    ReplyDelete