Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .