Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Using rpm -qlp I can get the content of an RPM package. How can I view the below scripts from the RPM package? (using say, cat, more or vi)

I want to print the following scripts (on my Linux machine) from inside the RPM package:

  • /home/Progect_ws/Progect/UFE_Install.sh
  • /home/Progect_ws/DB_client/UFE_Install.sh
#rpm -qlp CBS_Progect_WS-30_12.i386.rpm

/home/Progect_ws/Progect
/home/Progect_ws/Progect/Comverse-One-Progect-DROP1_3.5.50_TC10-Internal.zip
/home/Progect_ws/Progect/Configure_Progect.properties
/home/Progect_ws/Progect/UFE_Install.sh
/home/Progect_ws/DB_client
/home/Progect_ws/DB_client/Comverse-One-CLIENT-DROP1_3.5.50_TC10-Internal.zip
/home/Progect_ws/DB_client/Configure_client.properties
/home/Progect_ws/DB_client/UFE_Install.sh
share|improve this question

2 Answers 2

Use rpm2cpio but beware that it sends the cpio file to standard output, so you will want to pipe it to cpio to extract the files:

rpm2cpio CBS_Progect_WS-30_12.i386.rpm | cpio -idm
share|improve this answer

Perhaps rpm2cpio is what you want?

It converts a rpm to a cpio archive witch you then can extract files from: cpio -id < yourcpiofile

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.