RPM是一个用于系统维护和诊断,解决问题的十分有用的工具。了解各种选项用法的 最好方式是通过例子来学习。
rpm -Va
若是一些文件丢失了或已被损坏, 您就可以重新安装或先卸载再安装该软件包。
rpm -qf /usr/X11R6/bin/xjewel
而输出的结果会是:
xjewel-1.6-1
rpm -Vf /usr/bin/paste
这样相应的软件包就会被验证。.
rpm -qdf /usr/bin/ispell
输出结果为:
/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
输出结果大概为:
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
输出结果为:
/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
以上只是几个例子. 随着您进一步的使用系统,您会发现rpm的更多用途。.