LinuxCommandLibrary

dtrx

intelligent archive extraction tool

TLDR

Extract archive

$ dtrx [archive.tar.gz]
copy
Extract multiple archives
$ dtrx [*.tar.gz]
copy
Extract to specific directory
$ dtrx -o [output_dir] [archive.tar.gz]
copy
Extract flat (no subdirectory)
$ dtrx -f [archive.tar.gz]
copy
List archive contents
$ dtrx -l [archive.tar.gz]
copy
Extract with metadata preserved
$ dtrx -m [archive.tar.gz]
copy

SYNOPSIS

dtrx [options] archive...

DESCRIPTION

dtrx (Do The Right Extraction) intelligently extracts archives regardless of format. It automatically handles tar, zip, rar, 7z, and many other formats, creating sensibly-named directories for contents.
The tool solves common extraction problems: archives that extract many files into the current directory, nested archives, and varying archive formats. It always creates a single directory for the archive contents.
dtrx supports recursive extraction, automatically handling archives within archives.

PARAMETERS

ARCHIVE

Archive file(s) to extract.
-o, --output DIR
Output directory.
-f, --flat
Extract flat without directory.
-l, --list
List contents only.
-m, --metadata
Preserve ownership/permissions.
-r, --recursive
Extract nested archives.
-n, --noninteractive
Never prompt.
--help
Display help information.

CAVEATS

Requires appropriate extraction tools installed for each format. Some formats may need additional packages. Encrypted archives need passwords.

HISTORY

dtrx was created by Brett Smith to provide hassle-free archive extraction. It addresses the frustration of archives that behave differently, always doing "the right thing" regardless of format.

SEE ALSO

tar(1), unzip(1), 7z(1), atool(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community