Extract file(s) from an RPM package

Linux specific questions/information are gathered here. The main thrust of topics are applied to Centos/RedHat(RH)/Debian/Ubuntu/Gentoo distributives

Extract file(s) from an RPM package

Postby lik » Fri Aug 12, 2011 5:11 pm

Sometimes, only one or several files from an .rpm package are required and there is no need to install it on the system.
Let`s find where file(s) will be put after .rpm package install:
Code: Select all
# rpm -qlp nagios-plugins-1.4.15-2.el5.rf.x86_64.rpm | grep rbl
/usr/lib64/nagios/plugins/contrib/check_rbl.c

And extract only it from the archive:
Code: Select all
# rpm2cpio nagios-plugins-1.4.15-2.el5.rf.x86_64.rpm | cpio -ivd ./usr/lib64/nagios/plugins/contrib/check_rbl.c
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Centos YumAndRPM TipsAndTricks

Postby lik » Sat Aug 20, 2011 6:50 pm

lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am


Return to Linux specific

 


  • Related topics
    Replies
    Views
    Last post