Tuesday, August 7, 2012

Access any archive file with one command - Ubuntu

Usually to unzip any kind of zipped file we use many kinds of application as well as commands. Hence when extracting archive files using the terminal, there will be archive formats having its own command syntax to extract it. Like, zipped files need to be extracted using the "unzip" command line tool, tar files need the "TAR" command, for 7z files, you need the "p7zip" package to be able to extract them, and so on.

Now no more  difficult to memorize Ubuntu commands, you can simply use a single command to help you extract the various archive formats from the terminal. This universal archive extracting tool is called ATOOL. To install it under Ubuntu 12.04 or older, run the following command:

sudo apt-get install atool

Using the cd command, go the the destination folder containing your archive file (7z, tar.gz, zip, etc.) and run the following command:
atool -x filename.ext

Example:
atool -x google-chrome-stable.tar.gz

If you prefer to extract the archive file in another folder path, use the following command:
atool -X /path/to/folder/ filename.ext

Example:
atool -X /usr/bin/  google-chrome-stable.tar.gz

For more parameters, run this command:
atool --help

No comments:

Post a Comment