Skip to main content

Posts

Showing posts from September 5, 2010

How to Extract/Uncompress/Unarchive file in linux.

This is a no-frills Linux command line guide/cheat sheet that will help you extract or unarchive or uncompress just about any file that you’re bound to come across. If you’d like to have more options, read the man pages! Also, the opposite to this guide about creating/compressing/archiving files in Linux can be found here. Preliminary: Most compressed or archived files that you’ll come across already have built-in support under popular distributions (Ubuntu, Fedora, Suse, etc…), but some of them aren’t. I would recommend installing this group of packages using apt-get, yum, or an equivalent before using this guide (unless of course you already know what you need): [root@localhost]# yum install -y unzip p7zip unrar bzip2 gzip lzma 1. *.tar [root@localhost]# tar xvf filename.tar 2. *.tar.gz [root@localhost]# tar xzvf filename.tar.gz 3. *.tgz [root@localhost]# tar xvzf filename.tgz 4. *.tar.bz2 (Or maybe we mean *.tar.gz2) [root@localhost]# tar xjvf filename.tar.bz2 5. *.tar.bz [root@loca