Command-Line – Program for Consistent Interface Across Multiple Archive Types

archivecommand linecompression

At the moment, if I download a compressed file, it could be any of a .tar.gz archive, a tar.bz2 arhive, a .zip archive or a .gz archive. And each time I do so, I have to remember what the command line options for that program are.

Is there any CLI program where I can just go:

undocompression somefile.??

and let it figure out what format the archive is in? (overly long name used to avoid conflicting with any real program)

Best Answer

You can use p7zip. It automatically identifies the archive type and decompress it.

p7zip is the command line version of 7-Zip for Unix/Linux, made by an independent developer.

7z e <file_name>

Related Question