Jump to content

e - Extract Any Archive


abarbarian

Recommended Posts

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.org/pub/distributions/ALTLinux/p6/branch/files/x86_64/RPMS/wmbday-0.3.1-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.cyberciti.biz/tips/e-tool-to-extract-rpm-rar-zip.html

 

which led me to the developers page,

 

https://martin.ankerl.com/2006/08/11/program-e-extract-any-archive/

 

 

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.

 

 

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:

  • Like 1
Link to comment
Share on other sites

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.archlinux.org/packages/extra/i686/ark/

 

:breakfast:

Edited by abarbarian
Link to comment
Share on other sites

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:

Link to comment
Share on other sites

 

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:

Link to comment
Share on other sites

V.T. Eric Layton

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

Link to comment
Share on other sites

V.T. Eric Layton

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...