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


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

Perhaps rpm2cpio is what you want?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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