Skip to content

unp

A wrapper that works out which extractor an archive needs and calls it.

Homebrew formula

What it does

unp looks at a file, picks the right tool — tar, unzip, 7z, unrar, gunzip, bunzip2, xz, cabextract and so on — and runs it with sensible flags. One command instead of remembering which of tar xzf, tar xjf or tar xJf this particular tarball wants.

unp archive.tar.zst
unp *.zip                # several at once
unp -U messy.zip         # unpack into a subdirectory

Notes

A Perl script from Debian, so it depends on the extractors actually being installed — it dispatches, it does not decompress. With p7zip and rar present it covers essentially everything.

Alternative to

AlternativeTypeTrade-off
dtrxOpen sourceThe same idea, with safer extraction into a subdirectory by default
atoolOpen sourceAnother dispatcher, with more format coverage
tar xfBuilt inModern tar detects compression on its own, which covers most cases

Install

brew install unp

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on