이 콘텐츠는 선택한 언어로 제공되지 않습니다.

15.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. To verify your entire system and see what might be missing, you could try the following command:
    Copy to Clipboard Toggle word wrap
    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 re-install the package.
  • At some point, you might see a file that you do not recognize. To find out which package owns it, enter:
    Copy to Clipboard Toggle word wrap
    rpm -qf /usr/bin/ggv
    The output would look like the following:
    Copy to Clipboard Toggle word wrap
    ggv-2.6.0-2
    
  • 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 program, but you do not know which package owns paste. Enter the following command,
    Copy to Clipboard Toggle word wrap
    rpm -Vf /usr/bin/paste
    and the appropriate package is 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:
    Copy to Clipboard Toggle word wrap
    rpm -qdf /usr/bin/free
    The output would be similar to the following:
    Copy to Clipboard Toggle word wrap
    /usr/share/doc/procps-3.2.3/BUGS
    /usr/share/doc/procps-3.2.3/FAQ
    /usr/share/doc/procps-3.2.3/NEWS
    /usr/share/doc/procps-3.2.3/TODO
    /usr/share/man/man1/free.1.gz
    /usr/share/man/man1/pgrep.1.gz
    /usr/share/man/man1/pkill.1.gz
    /usr/share/man/man1/pmap.1.gz
    /usr/share/man/man1/ps.1.gz
    /usr/share/man/man1/skill.1.gz
    /usr/share/man/man1/slabtop.1.gz
    /usr/share/man/man1/snice.1.gz
    /usr/share/man/man1/tload.1.gz
    /usr/share/man/man1/top.1.gz
    /usr/share/man/man1/uptime.1.gz
    /usr/share/man/man1/w.1.gz
    /usr/share/man/man1/watch.1.gz
    /usr/share/man/man5/sysctl.conf.5.gz
    /usr/share/man/man8/sysctl.8.gz
    /usr/share/man/man8/vmstat.8.gz
    
  • You may find a new RPM, but you do not know what it does. To find information about it, use the following command:
    Copy to Clipboard Toggle word wrap
    rpm -qip crontabs-1.10-7.noarch.rpm
    The output would be similar to the following:
    Copy to Clipboard Toggle word wrap
    Name        : crontabs                     Relocations: (not relocatable)
    Version     : 1.10                              Vendor: Red Hat, Inc
    Release     : 7                             Build Date: Mon 20 Sep 2004 05:58:10 PM EDT
    Install Date: (not installed)               Build Host: tweety.build.redhat.com
    Group       : System Environment/Base       Source RPM: crontabs-1.10-7.src.rpm
    Size        : 1004                             License: Public Domain
    Signature   : DSA/SHA1, Wed 05 Jan 2005 06:05:25 PM EST, Key ID 219180cddb42a60e
    Packager    : Red Hat, Inc <http://bugzilla.redhat.com/bugzilla>
    Summary     : Root crontab files used to schedule the execution of programs.
    Description :
    The crontabs package contains root crontab files. Crontab is the
    program used to install, uninstall, or list the tables used to drive the
    cron daemon. The cron daemon checks the crontab files to see when
    particular commands are scheduled to be executed. If commands are
    scheduled, then it executes them.
    
  • Perhaps you now want to see what files the crontabs RPM installs. You would enter the following:
    Copy to Clipboard Toggle word wrap
    rpm -qlp crontabs-1.10-5.noarch.rpm
    The output is similar to the following:
    Copy to Clipboard Toggle word wrap
    /etc/cron.daily
    /etc/cron.hourly
    /etc/cron.monthly
    /etc/cron.weekly
    /etc/crontab
    /usr/bin/run-parts
    
These are just a few examples. As you use it, you will find many more uses for RPM.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat, Inc.