atool
Extract, list, create, and check archive files
TLDR
List files in an archive
Extract an archive (safely creates a subdirectory if needed)
Extract an archive to a specific directory
Display a specific file's content from an archive to stdout (like cat)
Create a new archive from specified files and/or directories
List files in an archive and send the output through a pager
Extract multiple archives at once (each to its own subdirectory if needed)
Repack an archive from one format to another (e.g., .tar.gz to .tar.7z)
SYNOPSIS
atool [options] {c|x|e|p|l|t|a|d} archive [files...]
PARAMETERS
-h, --help
Display help message and exit
-V, --version
Show version information and exit
-v, --verbose[=level]
Increase verbosity (default level 1; 0=quiet, 2=more)
-q
Shortcut for --verbose=0 (quiet mode)
-f, --force
Overwrite existing files without prompting
-n, --simulate
Dry run: show actions without executing
-D, --dir=DIR
Change to directory DIR before processing
-F, --format=FORMAT
Force specific archive format
-S, --program=PROG
Use PROG as the archive handler
-o, --option=OPT
Pass OPT to the backend program
--files-from=FILE
Read list of files from FILE
-X, --exclude=PATTERN
Exclude files matching PATTERN
--include=PATTERN
Include only files matching PATTERN
--each
Recurse into nested archives
--list-formats
List all supported formats
--explain
Explain detection and actions
--password=PASS
Supply password for encrypted archives
DESCRIPTION
atool is a versatile Linux command-line script that provides a consistent interface for handling numerous archive and compression formats. It supports operations like creating (c), extracting (x or e), listing (l), testing (t), printing (p), adding (a), and deleting (d) files in archives such as tar, zip, rar, 7z, gzip, bzip2, xz, lzma, deb, rpm, and many more.
atool automatically detects archive types and invokes the appropriate backend tools (e.g., tar, unzip, unrar, 7za). This eliminates the need to learn syntax for each format. Options allow customization like verbosity control, directory changes, format overrides, and exclusion patterns. It preserves file permissions, timestamps, and handles passwords for encrypted archives.
Ideal for scripts and users dealing with mixed archive types, atool simplifies workflows in backups, package management, and file distribution. Verbose mode aids debugging, while simulation previews actions without changes.
CAVEATS
Requires backend tools installed (e.g., tar, unzip, unrar, 7z). Some formats limited by backend capabilities. No built-in compression selection for all cases; use options like --gzip.
COMMON COMMANDS
c: create archive
x|e: extract (x uses full paths)
l: list contents
t: test archive
p: print to stdout
SUPPORTED FORMATS
Over 50 types: tar, zip, rar, 7z, gz, bz2, xz, lzma, deb, rpm, ar, cab, lha, ace, zoo, jar, war, ear, slp, ha, z.
Use atool --list-formats for complete list.
HISTORY
Developed by Astrid in 1999 as part of her 'a*' tool suite. Initial release 0.10; evolved to support more formats. Latest stable 0.39.0 (2017), maintained in distributions like Debian.


