How To Decompress Linux Archive Files

# extract archive:
unrar e rar-archive.rar
unzip -uo -d ghost					-> extract 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- ffp		-> compress ffp folder into linux-
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> <filename>
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

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

Leave a Reply

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