Code Yarns ‍👨‍💻
Tech Blog ❖ Personal Blog

How to zip or unzip any file using atool

📅 2013-Jan-25 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ apack, archive, atool, aunpack, compression, cygwin, ubuntu, zip ⬩ 📚 Archive

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