RPM is a very useful tool for both managing your system and diagnosing and fixing problems. The best way to make sense of all the options is to look at some examples.
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.
rpm -qf /usr/X11R6/bin/xjewel
The output would look like:
xjewel-1.6-1
rpm -Vf /usr/bin/paste
and the appropriate package will be verified.
rpm -qdf /usr/bin/ispell
The output would be:
/usr/man/man4/ispell.4 /usr/man/man4/english.4 /usr/man/man1/unsq.1 /usr/man/man1/tryaffix.1 /usr/man/man1/sq.1 /usr/man/man1/munchlist.1 /usr/man/man1/ispell.1 /usr/man/man1/findaffix.1 /usr/man/man1/buildhash.1 /usr/info/ispell.info.gz /usr/doc/ispell-3.1.18-1/README
rpm -qip koules-1.2-2.i386.rpm
The output would be:
Name : koules Distribution: Red Hat Linux Colgate Version : 1.2 Vendor: Red Hat Software Release : 2 Build Date: Mon Sep 02 11:59:12 1996 Install date: (none) Build Host: porky.redhat.com Group : Games Source RPM: koules-1.2-2.src.rpm Size : 614939 Summary : SVGAlib action game; multiplayer, network Description : This arcade-style game is novel in conception and excellent in execution. No shooting, no blood, no guts, no gore. The play is simple, but you still must develop skill to play. This version uses SVGAlib to run on a graphics console.
rpm -qlp koules-1.2-2.i386.rpm
The output is:
/usr/man/man6/koules.6 /usr/lib/games/kouleslib/start.raw /usr/lib/games/kouleslib/end.raw /usr/lib/games/kouleslib/destroy2.raw /usr/lib/games/kouleslib/destroy1.raw /usr/lib/games/kouleslib/creator2.raw /usr/lib/games/kouleslib/creator1.raw /usr/lib/games/kouleslib/colize.raw /usr/lib/games/kouleslib /usr/games/koules
These are just several examples. As you use the system you will find many more uses for rpm.