Tuesday, April 12, 2016

How to extract all kind of archive format with one program


There are so many archive format in this world, such as zip, tar, tar.gz, rar, 7z, gz, bz2, and so on, the problem is, each archive format have their own commands for extracting/unzipping.

So as linux user and command line lover, you need to remember all of those commands and parameters, and it could be very frustrating.

But luckily, on lubuntu (and ubuntu in general) there is a cool programm called dtrx which take cares of extracting/unzipping for all kinds of archive format. 

So basically you only need one program and one command to extract all kind of archive format, one program to rule them all :)

Installing dtrx on lubuntu is pretty easy, simply open the terminal/console/command prompt, and then run this command:

sudo apt-get install dtrx

kernelpanic@kernelpanic:~$ sudo apt-get install dtrx
[sudo] password for kernelpanic: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libart-2.0-2 libbonobo2-0 libbonobo2-common libbonoboui2-0
  libbonoboui2-common libgail18 libgnome2-0 libgnome2-bin libgnome2-common
  libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common
  libidl0 liborbit-2-0 liborbit2 linux-headers-4.2.0-16
  linux-headers-4.2.0-16-generic linux-headers-4.2.0-23
  linux-headers-4.2.0-23-generic linux-image-4.2.0-16-generic
  linux-image-4.2.0-23-generic linux-image-extra-4.2.0-16-generic
  linux-image-extra-4.2.0-23-generic python-gconf python-gnome2 python-gtk2
  python-keybinder python-notify python-pyorbit python-vte
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  p7zip-full
Suggested packages:
  p7zip-rar
The following NEW packages will be installed:
  dtrx p7zip-full
0 upgraded, 2 newly installed, 0 to remove and 128 not upgraded.
Need to get 942 kB of archives.
After this operation, 4.070 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu/ wily/universe p7zip-full amd64 9.20.1~dfsg.1-4.2 [919 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ wily/universe dtrx all 6.6-1.2 [22,5 kB]
Fetched 942 kB in 3min 6s (5.045 B/s)
Selecting previously unselected package p7zip-full.
(Reading database ... 228935 files and directories currently installed.)
Preparing to unpack .../p7zip-full_9.20.1~dfsg.1-4.2_amd64.deb ...
Unpacking p7zip-full (9.20.1~dfsg.1-4.2) ...
Selecting previously unselected package dtrx.
Preparing to unpack .../archives/dtrx_6.6-1.2_all.deb ...
Unpacking dtrx (6.6-1.2) ...
Processing triggers for man-db (2.7.4-1) ...
Setting up p7zip-full (9.20.1~dfsg.1-4.2) ...
Setting up dtrx (6.6-1.2) ...

The package size is not too big, so i think it won't be a problem for you, once installed you can start using dtrx like this:

dtrx [name of the file]

dtrx data.zip
dtrx mydata.tar.gz
dtrx whatever.bz2
dtrx home_sweet_home.lzma

No comments:

Post a Comment