PATOOL
Easy de-archiving
Shashank Sharma considers himself to be a multitasking maestro, and is naturally impressed with nifty utilities that can do the job of many.
Credit: https://wummel.github.io/patool/
OUR EXPERT Shashank Sharma is a trial lawyer in Delhi and an avid Arch user. He’s been writing about open source software for 20 years, and lawyering for over 10.
QUICK TIP
You’ll have to install the Python package argcomplete if you want to use auto-complete for Patool’s subcommands. Patool’s documentation on the subject is insufficient, and not applicable for all distros. A quick web search will provide answers.
The Linux distro is home to a large number of compression utilities, each with its own myriad T subcommands and options. Remembering them all is a Herculean challenge, even for veterans. What complicates the situation further is that no single tool is equipped to handle all the different file formats, such as TAR, BZ2, GZIP, GZ, TAR.GZ, RAR and so on. Released under the GPLv3 licence, Patool is a portable archive file manager written in Python. You no longer have to rely on separate commands or remember their myriad options, as Patool supports just about all archive and compression formats. Even better, it uses sane and generic command options such as extract and create to respectively decompress an archive or to make one from the supplied set of files.
The project’s website suggests running the sudo pip install patool command to install Patool. While this might work for some distros, Debian and recent iterations of Ubuntu no longer allow installing Python packages in this way. If your distro throws up an externally managed environment error when you run the pip install command, but you still want to install packages using Pip, your only option is to create a virtual environment. Thankfully, there’s a quicker workaround that works for all distros.