Easily Extract Many Archives with dtrx
dtrx means “Do The Right Extraction”. It is a very useful command-line tool for extracting many archive files. Using tar -zxf or tar xjf is sometimes frustrating and confuses a lot. dtrx just simple saves you from all those hustles.
Why? Using dtrx replaces either tar -zxf or tar xjf so you don’t have to worry about which is which, it knows which flag is appropriate. dtrx is very simple and powerful. dtrx also changes the permissions of the extract making it very easy for to read and write all those files.
- Can be used on many archive types, you just need to remember only one simple command, that is dtrx to extract tar, zip, cpio, deb, rpm, gem, 7z, cab, lzh, rar, gz, bz2, lzma, xz, and many kinds of exe files, including Microsoft Cabinet archives.
- InstallShield archives, and self-extracting zip files. If they have any extra compression, like tar.bz2 files, dtrx will take care of that for you, too.
- Keeps everything organized: dtrx will make sure that archives are extracted into their own specified directories.
- Permissions: dtrx makes sure you can read and write all the files you just extracted, while leaving the rest of the permissions intact.
- Recursive extraction: dtrx can find archives inside the archive and extract those ones too.
For Ubuntu, dtrx is available in the default repositories. Therefore, run the command below to install:
enock@enock-pc:~$ sudo apt-get install dtrx
To extract archives, simple call dtrx on it. For example, I want extract the archive file unixmen.tar.gz, I only call dtrx on it without remembering which flag is which.
enock@enock-pc:~$ dtrx unixmen.tar.gz
After running the above command, press:
- a to Always extract included archives during this session
- o to extract included archives this once
- n to choose not to extract included archives this once
- v to never extract included archives during this session
- l to list included archives