Wikia

How To Wiki

Howto compress files in Unix

Talk0
1,789pages on
this wiki

This shows how to compress files or folders via command line, of many formats.

Common Compression FormatsEdit

IntroductionEdit

for these examples "app" is a file or folder that you want to compress, and compressed fire that is created is "app.tar.*"

Command LineEdit

gzip formatEdit

tar -czvf app.tar.gz app

bz2 formatEdit

tar -cjvf app.tar.bz2 app

xz formatEdit

tar -cJvf app.tar.xz app

zip formatEdit

rar formatEdit

  • directory: rar a app.rar app/
  • file: rar a app.rar app
  • rar man page

LZMA formatEdit

  • Fast compression:
    • tar -cv app |lzma e -a0 -d15 -fb16 -mfhc4 -si -so >app.tar.lzma
  • Normal compression:
    • tar -cv app |lzma e -d21 -fb32 -si -so >app.tar.lzma
  • Maximum compression:
    • tar -cv app |lzma e -si -so >app.tar.lzma
  • Ultra compression:
    • tar -cv app |lzma e -d25 -si -so >app.tar.lzma
  • lzma man page

7zip formatEdit

file: 7zr a app.7z app

Uncompressed archiveEdit

tar -cvf app.tar app

GUIEdit

  • please add

ReferencesEdit

Around Wikia's network

Random Wiki