📄 doc055.htm
字号:
<html><body><a href="doc056.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc054.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr><h2><a name="s7.3">7.3 Impressing Your Friends with RPM</a></h2><title>Impressing Your Friends with RPM</title><p>RPM is a very useful tool for both managing your system and diagnosingand fixing problems. The best way to make sense of all the optionsis to look at some examples.<p><ul><li>Let's say you delete some files by accident, but you aren't surewhat you deleted. If you want to verify your entire system and see whatmight be missing, you would enter:<blockquote><font size=-1><tt><pre>rpm -Va</pre></tt></font></blockquote>If some files are missing, or appear to have been corrupted, you shouldprobably either re-install the package or uninstall, then re-install thepackage.<p><li>Let's say you run across a file that you don't recognize. To findout which package owns it, you would enter:<blockquote><font size=-1><tt><pre>rpm -qf /usr/X11R6/bin/xjewel</pre></tt></font></blockquote><p>The output would look like:<blockquote><font size=-1><tt><pre>xjewel-1.6-1</pre></tt></font></blockquote><p><a name="i199"><p><li>We can combine the above two examples in the following scenario.Say you are having problems with <tt>/usr/bin/paste</tt>. You would liketo verify the package that owns that program but you don't know whichpackage that is. Simply enter:<blockquote><font size=-1><tt><pre>rpm -Vf /usr/bin/paste</pre></tt></font></blockquote>and the appropriate package will be verified.<p><a name="i200"><li>If you are using a program and want to find out more informationabout it, you can enter the following to find out what documentationcame with the package that ``owns'' that program (in this case <tt>ispell</tt>):<blockquote><font size=-1><tt><pre>rpm -qdf /usr/bin/ispell</pre></tt></font></blockquote><p>The output would be:<blockquote><font size=-1><tt><pre>/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</pre></tt></font></blockquote><p><a name="i201"><li>You find a new koules RPM, but you don't know what it is. To find outsome information on it, enter:<blockquote><font size=-1><tt><pre>rpm -qip koules-1.2-2.i386.rpm</pre></tt></font></blockquote><p>The output would be:<blockquote><font size=-1><tt><pre>Name : koules Distribution: Red Hat Linux ColgateVersion : 1.2 Vendor: Red Hat SoftwareRelease : 2 Build Date: Mon Sep 02 11:59:12 1996Install date: (none) Build Host: porky.redhat.comGroup : Games Source RPM: koules-1.2-2.src.rpmSize : 614939Summary : SVGAlib action game; multiplayer, network, sound 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.</pre></tt></font></blockquote><li>Now you want to see what files the koules RPM installs. You would enter:<a name="i202"><blockquote><font size=-1><tt><pre>rpm -qlp koules-1.2-2.i386.rpm</pre></tt></font></blockquote><p>The output is:<blockquote><font size=-1><tt><pre>/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</pre></tt></font></blockquote><p></ul><p>These are just several examples. As you use the system you willfind many more uses for rpm.<p><p><hr><a href="doc056.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc054.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -