Jump to content


e - Extract Any Archive

extract unzip zip tar gzip archiver compress

  • Please log in to reply
10 replies to this topic

#1 ONLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,378 posts

Posted 16 August 2017 - 10:18 AM

Was looking for a  way to extract a .rpm so I could look at the contents and came across this little beast. It did not manage to unpack the .rpm as it happens.

This is the file I tried to open,

http://ftp.altlinux....alt5.x86_64.rpm

However I did install the program on my Arch set up and it seems to work really well for the few compressed archives I tried it on.

The article I found was here at nixCraft

https://www.cybercit...pm-rar-zip.html

which led me to the developers page,

https://martin.anker...ct-any-archive/



Quote

What?

With this little tool you can extract almost any archive in Linux so you do not need to remember which tool and what command lines are necessary.
Why?

I got fed up with the sheer impossible number of compression formats out there. I am an avid linux command line user, but remembering 20 different commands with strange switches to get to the juicy content of a compressed files is too much for me.
Therefore I have just happily spent a few hours of my life to write the application e that identifies which extraction tool to call with what parameter in order to save me precious seconds of rereading forgotten manpages.

Quote


I was also inspired by the ugliness of the tool unp which tries to do exactly what e does. I did not like the implementation (written in Perl), and thought I can have the same features in a much simpler and more extensible way. The result is that e is just about 80 lines of code, where most of it is either comment or rules that define when to call what.

Just another oddity brought to you by by my curiosity for the esoteric. :breakfast:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#2 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 16 August 2017 - 11:08 AM

Ark opens .rpms with no troubles at all.

https://www.kde.org/.../utilities/ark/

#3 ONLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,378 posts

Posted 16 August 2017 - 01:12 PM

View PostV.T. Eric Layton, on 16 August 2017 - 11:08 AM, said:

Ark opens .rpms with no troubles at all.

https://www.kde.org/.../utilities/ark/

Ta, I am sure it is a really good program. However it will be a cold day in you know where before I resort to using such a complex program,

[longship@18:05:45 ~]$ paci ark
resolving dependencies...
:: There are 2 providers available for phonon-qt5-backend:
:: Repository extra
1) phonon-qt5-gstreamer 2) phonon-qt5-vlc
Enter a number (default=1): 1
looking for conflicting packages...
warning: dependency cycle detected:
warning: usbmuxd will be installed before its libimobiledevice dependency
warning: dependency cycle detected:
warning: phonon-qt5-gstreamer will be installed before its phonon-qt5 dependency
warning: dependency cycle detected:
warning: kinit will be installed before its kio dependency
Packages (44) attica-qt5-5.36.0-1 karchive-5.36.0-1 kauth-5.36.0-1
			 kbookmarks-5.36.0-1 kcodecs-5.36.0-1 kcompletion-5.36.0-1
			 kconfig-5.36.0-1 kconfigwidgets-5.36.0-1 kcoreaddons-5.36.0-1
			 kcrash-5.36.0-1 kdbusaddons-5.36.0-1 kglobalaccel-5.36.0-1
			 kguiaddons-5.36.0-1 ki18n-5.36.0-1 kiconthemes-5.36.0-1
			 kinit-5.36.0-1 kio-5.36.0-1 kitemmodels-5.36.0-1
			 kitemviews-5.36.0-1 kjobwidgets-5.36.0-1
			 knotifications-5.36.0-1 kparts-5.36.0-1 kpty-5.36.0-1
			 kservice-5.36.0-1 ktextwidgets-5.36.0-1 kwallet-5.36.0-1
			 kwidgetsaddons-5.36.0-1 kwindowsystem-5.36.0-1 kxmlgui-5.36.0-1
			 libdbusmenu-qt5-0.9.3+16.04.20160218-1 libimobiledevice-1.2.0-6
			 libplist-2.0.0-1 libusbmuxd-1.0.10-2 libzip-1.2.0-1
			 media-player-info-22-2 phonon-qt5-4.9.1-4
			 phonon-qt5-gstreamer-4.9.0-3 polkit-qt5-0.112.0+git20160226-1
			 qt5-speech-5.9.1-2 solid-5.36.0-1 sonnet-5.36.0-1
			 upower-0.99.4+12+g402640b-1 usbmuxd-1.1.0-2 ark-17.04.3-1
Total Download Size: 26.85 MiB
Total Installed Size: 110.66 MiB
:: Proceed with installation? [Y/n] n

An install of 110.66 MB's seems a tad overkill to me for a program that is,
Package Size: 1.1 MB Installed Size: 4.0 MB

https://www.archlinu...extra/i686/ark/

:breakfast:

Edited by abarbarian, 16 August 2017 - 01:13 PM.

Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#4 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 16 August 2017 - 01:17 PM

Ah... so solly. It's a KDE app.

#5 ONLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,378 posts

Posted 16 August 2017 - 01:32 PM

View PostV.T. Eric Layton, on 16 August 2017 - 01:17 PM, said:

Ah... so solly. It's a KDE app.

I have a program called Xarchiver that did not open the file I first linked to. It did open up another .rpm I downloaded but the unpack was not what I am used to seeing. It gave me a "usr" folder with two folders "bin" and "share" rather than the usual "programname.folder".

The "e" program failed with both files,

$ e inxi-2.3.34-1.mga7.noarch.rpm
no package supplied
cpio: premature end of archive
ERROR extraction not successful with these files:
inxi-2.3.34-1.mga7.noarch.rpm: RPM v3.0 bin i386/x86_64

which is strange as the developer says his program will handle .rpm's. I might contact him at G+ and ask why. :breakfast:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#6 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 16 August 2017 - 02:01 PM

http://www.wikihow.c...ct-RPM-Packages

#7 ONLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,378 posts

Posted 16 August 2017 - 02:37 PM

View PostV.T. Eric Layton, on 16 August 2017 - 02:01 PM, said:


The information he gives in 4 and 5 do not match up.

Arch is supposed to have a tool to unpack .rpm files. Ihave it installed but it refuses to do anything.

[root@longship aaaaaaaaaaaa]# pacaur -Q rpmextract
rpmextract 1.0-7
[root@longship aaaaaaaaaaaa]# rpmextract  wmbday-0.3.1-alt5.x86_64.rpm
-bash: rpmextract: command not found
[root@longship aaaaaaaaaaaa]# rpmextract -h
-bash: rpmextract: command not found
[root@longship aaaaaaaaaaaa]#

I have found a source file for the program I am playing with so I do not need to unpack a .rpm. I just thought it might be neat to know how to do it if I ever needed to.

:breakfast:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#8 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 16 August 2017 - 06:58 PM

I cannot be responsible for the content of the websites that I link to here. Enter and use that info at your own risk. ;)

#9 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 16 August 2017 - 07:08 PM

Umm... oddly enough, that method I posted in the link above extracted the .rpm file just fine.

vtel57@ericsbane07~/vtel57_downloads:$ rpm2cpio wmb* | cpio -dimv
./usr/bin/wmbday
./usr/lib/menu/wmbday
./usr/share/doc/wmbday-0.3.1
./usr/share/doc/wmbday-0.3.1/ChangeLog
./usr/share/doc/wmbday-0.3.1/data.sample.simple
./usr/share/doc/wmbday-0.3.1/data.sample.vcard
./usr/share/man/man1/wmbday.1.gz
58 blocks



#10 ONLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,378 posts

Posted 16 August 2017 - 09:36 PM

View PostV.T. Eric Layton, on 16 August 2017 - 07:08 PM, said:

Umm... oddly enough, that method I posted in the link above extracted the .rpm file just fine.

vtel57@ericsbane07~/vtel57_downloads:$ rpm2cpio wmb* | cpio -dimv
./usr/bin/wmbday
./usr/lib/menu/wmbday
./usr/share/doc/wmbday-0.3.1
./usr/share/doc/wmbday-0.3.1/ChangeLog
./usr/share/doc/wmbday-0.3.1/data.sample.simple
./usr/share/doc/wmbday-0.3.1/data.sample.vcard
./usr/share/man/man1/wmbday.1.gz
58 blocks


The code given may work but his information is not correct in 4 and 5 or at the very least confusing.

In 4 he gives a command that ends in "idmv" and says it will extract.

In 5 he gives the same command but it ends in " idv" and says it will install. Then he gives descriptions for "idvm" but seems to indicate they are for the install command.

At least it looks that way to me.

:breakfast:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#11 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,156 posts

Posted 17 August 2017 - 01:03 PM

Could just be your the view through your Guinness shaded glasses, mate. ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users