免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 888 | 回复: 0
打印 上一主题 下一主题

rpm command cheat sheet for Linux [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-20 10:52 |只看该作者 |倒序浏览


rpm is a powerful Package Manager for Red Hat, Suse and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description:
Syntax
Description
Example(s)
rpm -ivh {rpm-file}
Install the package
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm
rpm -Uvh {rpm-file}
Upgrade package
rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm
rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm
rpm -ev {package}
Erase/remove/ an installed package
rpm -ev mozilla-mail
rpm -ev --nodeps {package}
Erase/remove/ an installed package without checking for dependencies
rpm -ev --nodeps mozilla-mail



rpm -qa
Display list all installed packages
rpm -qa
rpm -qa | less
rpm -qi {package}
Display installed information along with package version and short description
rpm -qi mozilla-mail
rpm -qf {/path/to/file}
Find out what package a file belongs to i.e. find what package owns the file
rpm -qf /etc/passwd
rpm -qf /bin/bash
rpm -qc {pacakge-name}
Display list of configuration file(s) for a package
rpm -qc httpd
rpm -qcf {/path/to/file}
Display list of configuration files for a command
rpm -qcf /usr/X11R6/bin/xeyes
rpm -qa --last
Display list of all recently installed RPMs
rpm -qa --last
rpm -qa --last | less
rpm -qpR {.rpm-file}
rpm -qR {package}
Find out what dependencies a rpm file has
rpm -qpR mediawiki-1.4rc1-4.i586.rpm
rpm -qR bash


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/36915/showart_695566.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP