6

Extracting the contents of a (possibly compressed) archive file is a task I need to perform very often.

Depending on what method of compression and archive format the author of an archive file chose, I need to use one of the tar, unzip, gunzip, xz, or 7z commands (and there are probably others I haven't encountered, or that I have encountered but I can't think of right now), each with a slightly different command-line syntax.

It would be nice to have a single command that can handle all of these formats. Is there one?

Note that I don't necessarily expect a single tool to know about and handle all of the formats. I'd be perfectly happy with a tool that just provides a uniform interface, and plugins/connectors that provide support for the various formats.

HighCommander4
  • 218
  • 1
  • 5

1 Answers1

8

Short of writing your own wrapper script to 1) detect the archive type and then 2) use the appropriate command to extract it, a quick apt-cache search extract came up with dtrx that seems to do exactly what you're asking for.

Yet Another User
  • 355
  • 3
  • 10
ckujau
  • 1,385
  • 6
  • 15