List Contents Of An RPM Package

Often when building RedHat RPM packages I want to make sure that the package built correctly and all the files are present before I actually install the RPM, but I do keep forgetting the command to do this, so here it is for prosperity!


rpm -qlp

e.g.


root@build:/usr/src/redhat/SPECS# rpm -qlp ../RPMS/noarch/servicemap-0.16-1.noarch.rpm
/var/www/html/servicemap
/var/www/html/servicemap/amq.png
/var/www/html/servicemap/amqfail.png
/var/www/html/servicemap/amqreportingprov1prov1.png
/var/www/html/servicemap/amqreportingprov1prov2.png
/var/www/html/servicemap/amqreportingprov2prov1.png
/var/www/html/servicemap/amqreportingprov2prov2.png
/var/www/html/servicemap/amqsdrprov1prov1.png
/var/www/html/servicemap/amqsdrprov1prov2.png
/var/www/html/servicemap/amqsdrprov2prov1.png
/var/www/html/servicemap/amqsdrprov2prov2.png
/var/www/html/servicemap/amqslee1fail.png
/var/www/html/servicemap/amqslee1prov1.png
/var/www/html/servicemap/amqslee1prov2.png
/var/www/html/servicemap/amqslee2fail.png
/var/www/html/servicemap/amqslee2prov1.png
/var/www/html/servicemap/amqslee2prov2.png
/var/www/html/servicemap/amqvqeprov1prov1.png
/var/www/html/servicemap/amqvqeprov1prov2.png
/var/www/html/servicemap/amqvqeprov2prov1.png
/var/www/html/servicemap/amqvqeprov2prov2.png
/var/www/html/servicemap/amqwebserviceprov1prov1.png
/var/www/html/servicemap/amqwebserviceprov1prov2.png
/var/www/html/servicemap/amqwebserviceprov2prov1.png
/var/www/html/servicemap/amqwebserviceprov2prov2.png
/var/www/html/servicemap/checks.php
/var/www/html/servicemap/config.php
/var/www/html/servicemap/hash.png
/var/www/html/servicemap/index.php
/var/www/html/servicemap/nagios.php
/var/www/html/servicemap/script.php
/var/www/html/servicemap/sleevipactivenotok.png
/var/www/html/servicemap/style.php
/var/www/html/servicemap/ttprov1.png
/var/www/html/servicemap/ttprov1prov2.png
/var/www/html/servicemap/ttprov2.png
/var/www/html/servicemap/ttprov2prov1.png
/var/www/html/servicemap/ttprovfail.png
/var/www/html/servicemap/ttslee1.png
/var/www/html/servicemap/ttslee1slee2.png
/var/www/html/servicemap/ttslee2.png
/var/www/html/servicemap/ttsleefail.png
/var/www/html/servicemap/ttvipactivenotok.png
/var/www/html/servicemap/ttvipactiveok.png

Fedora Linux O’Reilly’s Fedora Linux covers everything you need to know about dealing with Redhat systems and is a recommended read for anyone who wants to seriously get in to Redhat administration.

Author: rus

Hi, I'm Rus and after 10 years of Linux administration and software development, in September 2014 I quit my day job, sold all my stuff and moved to Thailand to live the good life. My new website, http://www.ruspow.com shows how I'm making money online as well as what life can be like when you're not sat behind a desk and are free to make your own decisions!

2 thoughts on “List Contents Of An RPM Package”

Leave a Reply

Your email address will not be published. Required fields are marked *