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 and then reinstall 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 the following command:

    rpm -qf /usr/X11R6/bin/ghostview

    The output would look like the following:

    gv-3.5.8-18
  • We can combine the previous two examples in the following scenario. Say you are having problems with /usr/bin/paste and would like to verify the package that owns that program, but you do not know which package owns paste. In that case, simply enter the following command:

    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 will look 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 /usr/man/man1/tac.1.gz /usr/man/man1/tail.1.gz /usr/man/man1/tr.1.gz /usr/man/man1/tsort.1.gz /usr/man/man1/unexpand.1.gz /usr/man/man1/uniq.1.gz /usr/man/man1/wc.1.gz
  • Say you find a new RPM, but you do not know what it does. To find information about it, use the following command:

    rpm -qip sndconfig-0.68-3.i386.rpm

    The output would look like the following:

    Name        : sndconfig                    Relocations: (not relocateable) Version     : 0.68                              Vendor: Red Hat Release     : 3                             Build Date: Sun 23 Jun 2002 08:22:52 PM EDT Install date: Mon 01 Jul 2002 08:40:06 AM EDT      Build Host: perf90.perf.redhat.com Group       : Applications/Multimedia       Source RPM: sndconfig-0.68-3.src.rpm Size        : 619097                           License: GPL Packager    : Red Hat  http://bugzilla.redhat.com/bugzilla i Summary     : The Red Hat Linux sound configuration tool. Description : Sndconfig is a text based tool that sets up the configuration files you will need to use a sound card with a Red Hat Linux system. Sndconfig can be used to set the proper sound type for programs that use the /dev/dsp, /dev/audio, and /dev/mixer devices. The sound settings are saved by the aumix and sysV runlevel scripts.

  • Perhaps you now want to see what files the sndconfig RPM installs. You would enter the following:

    rpm -qlp sndconfig-0.68-3.i386.rpm

    The output will look like the following:

    /sbin/sndconfig /usr/sbin/sndconfig /usr/share/locale/bs/LC_MESSAGES/sndconfig.mo /usr/share/locale/cs/LC_MESSAGES/sndconfig.mo /usr/share/locale/da/LC_MESSAGES/sndconfig.mo /usr/share/locale/de/LC_MESSAGES/sndconfig.mo /usr/share/locale/es/LC_MESSAGES/sndconfig.mo /usr/share/locale/eu_ES/LC_MESSAGES/sndconfig.mo /usr/share/locale/fi/LC_MESSAGES/sndconfig.mo /usr/share/locale/fr/LC_MESSAGES/sndconfig.mo /usr/share/locale/gl/LC_MESSAGES/sndconfig.mo /usr/share/locale/hu/LC_MESSAGES/sndconfig.mo /usr/share/locale/id/LC_MESSAGES/sndconfig.mo /usr/share/locale/is/LC_MESSAGES/sndconfig.mo /usr/share/locale/it/LC_MESSAGES/sndconfig.mo /usr/share/locale/ja/LC_MESSAGES/sndconfig.mo /usr/share/locale/ko/LC_MESSAGES/sndconfig.mo /usr/share/locale/no/LC_MESSAGES/sndconfig.mo /usr/share/locale/pl/LC_MESSAGES/sndconfig.mo /usr/share/locale/pt/LC_MESSAGES/sndconfig.mo /usr/share/locale/pt_BR/LC_MESSAGES/sndconfig.mo /usr/share/locale/ro/LC_MESSAGES/sndconfig.mo /usr/share/locale/ru/LC_MESSAGES/sndconfig.mo /usr/share/locale/sk/LC_MESSAGES/sndconfig.mo /usr/share/locale/sl/LC_MESSAGES/sndconfig.mo /usr/share/locale/sr/LC_MESSAGES/sndconfig.mo /usr/share/locale/sv/LC_MESSAGES/sndconfig.mo /usr/share/locale/tr/LC_MESSAGES/sndconfig.mo /usr/share/locale/uk/LC_MESSAGES/sndconfig.mo /usr/share/locale/wa/LC_MESSAGES/sndconfig.mo /usr/share/locale/zh/LC_MESSAGES/sndconfig.mo /usr/share/locale/zh_CN.GB2312/LC_MESSAGES/sndconfig.mo /usr/share/locale/zh_TW.Big5/LC_MESSAGES/sndconfig.mo /usr/share/locale/zh_TW/LC_MESSAGES/sndconfig.mo /usr/share/man/man8/sndconfig.8.gz /usr/share/sndconfig /usr/share/sndconfig/sample.au /usr/share/sndconfig/sample.midi /usr/share/sndconfig/sample2.au

These are just a few examples. As you use RPM, you will find many more uses for it.




The Red Hat Documentation Team - Official Red Hat Linux User's Guide
The Red Hat Documentation Team - Official Red Hat Linux User's Guide
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net