old blog,

HOWTO: Extracting RPM from command line

Izhar Firdaus Izhar Firdaus Follow Support Jan 17, 2007 · 1 min read
HOWTO: Extracting RPM from command line
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
Sometimes, admins might want to extract some files from a RPM file for some purposes. If on a system with GUI, this can be easily done using file-roller or some other GUI based archive manager that supports RPM/CPIO archives. RPMs are basically modified CPIO archives, so we use rpm2cpio and cpio command to extract files from it in a CLI environment.

List out contained files
rpm2cpio <rpmpackage.rpm> |cpio -t

Extract all files
rpm2cpio <rpmpackage.rpm> |cpio -id

Extract specific file
rpm2cpio <rpmpackage.rpm> |cpio -id <file>
Note: extracting specific files requires you to put the full path of the file in the archive which you get from the cpio -t output.

You can read more about using cpio from the manpages and from this site
Written by Izhar Firdaus Follow Support
I'm a system architect, data engineer and developer advocate with passion in Free / Open Source software, entrepreneurship, community building, education and martial art. I take enjoyment in bridging and bringing together different FOSS technologies to help businesses and organizations utilize IT infrastructure to aid and optimize their business and organizational process.

HOWTO: Removing Firefox Menu Toolbar

Yet-another-shrinking-your-UI guide lol~..Lets go straight to the point. First, to those you a newbie in editing userChrome.css, loca...

In old blog, Jan 15, 2007

« Previous Post

Amano Hikaru - Thats me~!

While watching Death Note ep13 (thanks Animanda!) I realized that I can translate my name to Japanese name. Got the idea from Yagami ...

In old blog, Jan 17, 2007

Next Post »