How To Decompress Linux Archive Files

# extract archive:
unrar e rar-archive.rar
unzip sqlite-amalgamation-3071501.zip
unzip -uo ghost.zip -d ghost                    -> extract ghost.zip to ghost
tar xvzf mkvtoolnix-6.5.0-arm-1.tgz
tar xvzf mkvtoolnix-6.5.0-arm-1.tar.gz
tar xvzf ffp_0.7_arm_003.zpkg
tar xvfp wget-1.16.tar.xz
tar xvfJ archive.txz
tar jxf libebml-1.3.0.tar.bz2
gzip -cd aria2c.1.gz > aria2c.1                  -> extract aria2c.1.gz to aria2c.1
gunzip -kv archive.gz                           -> extract to current dir keeping the gz archive
tar xvf gmp-6.0.0a.tar.lz
tar -xf simple-tar-archive.tar
7za x -o7z938-src 7z938-src.7z                  -> extract 7z938-src.7z to 7z938-src

# compress:
tar czf linux-2.6.31.8-arm-1.tgz ffp        -> compress ffp folder into linux-2.6.31.8-arm-1.tgz
tar cvfJ archive.xz file1 fileN dir1 dirN   -> compress fileN dir1 dirN into xz/txz archive
zip -9 -r "zip file" "folder name"
zip -9 "zip file" "file name"
tar -zcvf exifweb.log.tar.gz exifweb.log    -> compress exifweb.log into exifweb.log.tar.gz

# view archive content
tar tf mkvtoolnix-6.5.0-arm-1.txz
unzip -l gallery-3.0.9.zip

# misc
tar cvzf - dir-to-compress/ | split -b 20MB - archive-block-prefix

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.