Installation guide
Chapter 25. Package Management with RPM 225
25.4. Impressing Your Friends with RPM
RPM is a useful tool for both managing your system and diagnosing and fixing problems.
The best way to make sense of all of its options is to look at some examples.
• Perhaps you have deleted some files by accident, but you are not sure what you deleted.
If you want to verify your entire system and see what might be missing, you could try the
following command:
rpm -Va
If some files are missing or appear to have been corrupted, you should probably either
re-install the package or uninstall, then re-install the package.
• At some point, you might see a file that you do not recognize. To find out which package
owns it, you would enter:
rpm -qf /usr/X11R6/bin/ghostview
The output would look like the following:
gv-3.5.8-10
• We can combine the above two examples in the following scenario. Say you are having
problems with /usr/bin/paste. You would like to verify the package that owns that pro-
gram, but you do not know which package owns paste. Simply enter the following com-
mand:
rpm -Vf /usr/bin/paste
and the appropriate package will be verified.
• Do you want to find out more information about a particular program? You can try the
following command to locate the documentation which came with the package that owns
that program:
rpm -qdf /usr/bin/md5sum
The output would be like the following:
/usr/share/doc/textutils-2.0a/NEWS
/usr/share/doc/textutils-2.0a/README
/usr/info/textutils.info.gz
/usr/man/man1/cat.1.gz
/usr/man/man1/cksum.1.gz
/usr/man/man1/comm.1.gz
/usr/man/man1/csplit.1.gz
/usr/man/man1/cut.1.gz
/usr/man/man1/expand.1.gz
/usr/man/man1/fmt.1.gz
/usr/man/man1/fold.1.gz
/usr/man/man1/head.1.gz
/usr/man/man1/join.1.gz
/usr/man/man1/md5sum.1.gz
/usr/man/man1/nl.1.gz
/usr/man/man1/od.1.gz
/usr/man/man1/paste.1.gz
/usr/man/man1/pr.1.gz
/usr/man/man1/ptx.1.gz
/usr/man/man1/sort.1.gz
/usr/man/man1/split.1.gz
/usr/man/man1/sum.1.gz