Product SiteDocumentation Site

4.2.6. Listing the state of the files in a package

The –s option to the rpm –q command lists the state of each file in a package. The basic syntax follows.
rpm –qs package_name
For example:
# rpm -qs tcsh
normal /bin/csh
normal /bin/tcsh
normal /usr/share/doc/tcsh-6.10
normal /usr/share/doc/tcsh-6.10/FAQ
normal /usr/share/doc/tcsh-6.10/Fixes
normal /usr/share/doc/tcsh-6.10/NewThings
normal /usr/share/doc/tcsh-6.10/complete.tcsh
normal /usr/share/doc/tcsh-6.10/eight-bit.txt
normal /usr/share/doc/tcsh-6.10/tcsh.html
normal /usr/share/doc/tcsh-6.10/tcsh.html/header.html
normal /usr/share/doc/tcsh-6.10/tcsh.html/index.html
normal /usr/share/doc/tcsh-6.10/tcsh.html/lists.html
normal /usr/share/doc/tcsh-6.10/tcsh.html/tcsh.man
normal /usr/share/doc/tcsh-6.10/tcsh.html/tcsh.man2html
normal /usr/share/doc/tcsh-6.10/tcsh.html/top.html
not installed /usr/share/locale/de/LC_MESSAGES/tcsh
not installed /usr/share/locale/el/LC_MESSAGES/tcsh
not installed /usr/share/locale/es/LC_MESSAGES/tcsh
not installed /usr/share/locale/fr/LC_MESSAGES/tcsh
not installed /usr/share/locale/it/LC_MESSAGES/tcsh
not installed /usr/share/locale/ja/LC_MESSAGES/tcsh
normal /usr/share/man/man1/tcsh.1.gz
You can also use the longer option, --state, in place of –s.
You can combine the –s option with other file filters, such as –d, for listing only the documentation files for a package.
Table 5-2 lists the states that the rpm command supports.
Table 5-2 RPM File States
State
Usage
normal
The file has been installed.
not installed
The file from the package is not installed.
replaced
The file has been replaced.
Sometimes files in a package may have been skipped during installation with options such as --excludedocs. This can lead to non-normal states. You may have also modified files installed from a given package.
Cross Reference
See Chapter 3, Using RPM for more on installing RPMs.