一半君的总结纸

听话只听一半君

yum rpm tips

yum 备忘录

# 在已安装的packages里找某个package,通常是想知道自己装了什么版本或是 装没装 或是想知道是不是yum装的
yum list installed | grep xxx

# 缺少某个文件,但是又不知道是哪个package里面的
yum whatprovides */xxx

# 从文件名得到此文件在哪个package里面
rpm -qf /path/to/file

# 显示已安装的某个package里面有哪些文件
rpm -ql package-name

# 显示某个package的所有能装的版本
<code class="bash plain">yum list package-name</code>
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: