Linux CLI Tarball extraction

Need to extract a bzip2 or gzip file? well here’s how to do it  :   Bzip2 in the file.bz2 format : bunzip2 file.bz2 a tar file with bzip2 compression : tar xjvf file.tar.bz2 A tar file with no compression : tar xvf file.tar A tar file with Gzip compression : tar zxvf file.tar.gz tar zxvf file.tgz A 7zip file : 7z x file.7z 7z x Rar Files : unrar x file.rar

Archive & Compression utilities

Compression types and utils in Linux There are many compression utilities available to the average users on a linux system, so which one is best? well it all depends on what your intended use/goal for the file(s) is. Are you planning on sending the file to other OS’s? are you planning on decompressing the file on a new system where you might not have the same tools available? etc etc. I am writing about some of the ones I have used, and since this is from my usage some of it may not be entirely true and I may have dreamed up during my hallucinatory state while attending classes. Zip The Most popular tool, archives and provides basic compression. Works on most OS’s popularly used today. zip <filename> <files to compress>      —– zip files into one archive zip doc1 doc2 doc3 doc4 unzip <filename>       —– unzip files from an archive into their proper paths under current directory. unzip -j <filename>      —– unzip files from the archive into current directory not following directory structure. Tar Archive only, no compression applied by default. usually found with .tar extension tar -cf        —– tar multiple files into one archive with no compression (see bzip2 / gzip for compression) tar -xf <filename>      —– extract files from a tarball Rar Proprietary but with support for almost all popular platforms, decent compression + archival. usually found with .rar extension rar a <filename> <files to compress>      —– archive + compress unrar x <filename>     […]