How to zip or unzip any file using atool

Files available on the internet are in a myriad archive or compressed formats. And when you want to zip some files, you might find yourself choosing different compression formats depending on the intended use, receiver or file size.

It would be easy to have a single commandline tool that can deal with all these compression formats. Thankfully, both Ubuntu and Cygwin ship with the awesome atool.

It can be installed using the package named atool. On Cygwin, it is available with the package name atool.

To unzip a file compressed in any format, use the aunpack command. For example:

$ aunpack foobar-zipped.7z

To compress files into a zip file of any format, use the apack command. For example:

$ apack foobar-zipped.bz2 foobar/*

Tried with: atool 0.38.0 and Ubuntu 12.04.1 LTS, atool 0.39.0 and Cygwin 1.7.22

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s