How To : List RPM Files
How can I list files inside an RPM without installing it ?
Any deal we have to do with RPM files, we are going to use the rpm command. Download the RPM file of which you would like to see the content, then follow this command:
# rpm -qlp package.rpm
For ex: To list the files stored in zenon-0.5.0-7.fc12.i686.rpm
# rpm -qlp zenon-0.5.0-7.fc12.i686.rpm
Output:
/usr/bin/zenon
/usr/share/doc/zenon-0.5.0
/usr/share/doc/zenon-0.5.0/LICENSE
/usr/share/man/man5/zenon-format.5.gz
/usr/share/zenon
/usr/share/zenon/zenon_equiv.v
/usr/share/doc/zenon-0.5.0
/usr/share/doc/zenon-0.5.0/LICENSE
/usr/share/man/man5/zenon-format.5.gz
/usr/share/zenon
/usr/share/zenon/zenon_equiv.v
At the same time, we can use “less” also to get more details about the rpm and the files present inside it:
# less zenon-0.5.0-7.fc12.i686.rpm
Output:
URL : http://focal.inria.fr/zenon
Summary : Automated theorem prover for first-order classical logic
Description :
Zenon is an automated theorem prover for first order classical logic
with equality, based on the tableau method.
....
...
..
.
-rw-r--r-- 1 root root 1100 Jul 26 2008 /usr/share/man/man5/zenon-format.5.gz
drwxr-xr-x 2 root root 0 Sep 23 01:25 /usr/share/zenon
-rw-r--r-- 1 root root 3202 Sep 23 01:25 /usr/share/zenon/zenon.v
-rw-r--r-- 1 root root 6193 Sep 23 01:25 /usr/share/zenon/zenon_coqbool.v
-rw-r--r-- 1 root root 48076 Sep 23 01:25 /usr/share/zenon/zenon_equiv.v
Summary : Automated theorem prover for first-order classical logic
Description :
Zenon is an automated theorem prover for first order classical logic
with equality, based on the tableau method.
....
...
..
.
-rw-r--r-- 1 root root 1100 Jul 26 2008 /usr/share/man/man5/zenon-format.5.gz
drwxr-xr-x 2 root root 0 Sep 23 01:25 /usr/share/zenon
-rw-r--r-- 1 root root 3202 Sep 23 01:25 /usr/share/zenon/zenon.v
-rw-r--r-- 1 root root 6193 Sep 23 01:25 /usr/share/zenon/zenon_coqbool.v
-rw-r--r-- 1 root root 48076 Sep 23 01:25 /usr/share/zenon/zenon_equiv.v
So, This way works when you have the RPM package downloaded to your system but what when you have a package installed on your system and you would like to know what all files that package installed. This can be done with this:
# rpm -ql package-name
So, if u like to know what all files is installed by zenon package, use this:
# rpm -ql zenon
Output:
/usr/bin/zenon
/usr/share/doc/zenon-0.5.0
/usr/share/doc/zenon-0.5.0/LICENSE
/usr/share/man/man5/zenon-format.5.gz
/usr/share/zenon
/usr/share/zenon/zenon_equiv.v
/usr/share/doc/zenon-0.5.0
/usr/share/doc/zenon-0.5.0/LICENSE
/usr/share/man/man5/zenon-format.5.gz
/usr/share/zenon
/usr/share/zenon/zenon_equiv.v