unar
Universal multi-format archive extractor
TLDR
Extract archive
SYNOPSIS
unar [-o dir] [-p password] [-e encoding] [options] archive
DESCRIPTION
unar extracts archives of many formats. It handles Zip, RAR, 7-Zip, tar, gzip, bzip2, ISO, and many legacy formats.
Format detection is automatic. The tool examines archive contents rather than relying solely on extensions.
Encoding handling processes international filenames correctly. Japanese, Chinese, Korean, and other encodings are supported and auto-detected.
Password handling works for encrypted archives. Both header-encrypted and content-encrypted formats are supported.
The tool handles broken or non-standard archives that other extractors reject. It attempts to recover what it can.
By default, archives extract to a directory named after the archive. This can be controlled with -d or -D options.
PARAMETERS
-o DIR
Output directory.-p PASSWORD
Archive password.-e ENCODING
Filename encoding.-f, --force
Overwrite without asking.-D, --no-directory
Don't create containing directory.-d, --directory
Always create directory.-k MODE
How to handle existing files.-q, --quiet
Quiet mode.-t, --test
Test archive.-nr, --no-recursion
Don't extract nested archives.-h, --help
Show help.
CAVEATS
Not installed by default. Some formats have limited metadata support. Very old formats may have quirks.
HISTORY
unar is part of The Unarchiver, created by Dag Ă…gren starting around 2006. Originally a macOS GUI application, command-line tools were added later for scripting.
