Linux Command-rpm query package

Source: Internet
Author: User

What RPM packages are installed?

[[email protected] packages]# Rpm-qa/////View all installed packages

[[email protected] packages]# rpm-qa libxkbfile/////-QA parking name
Libxkbfile-1.0.6-1.1.el6.x86_64

[[email protected] packages]# Rpm-qa vim////No
[[email protected] packages]# Rpm-qa vim*////No
[[email protected] packages]# Rpm-qa |grep vim*////No
[[email protected] packages]# Rpm-qa |grep vim////can be found
Vim-filesystem-7.4.629-5.el6.x86_64
Vim-minimal-7.2.411-1.8.el6.x86_64
Vim-common-7.4.629-5.el6.x86_64
Vim-enhanced-7.4.629-5.el6.x86_64

[[email protected] packages]# rpm-qa |grep ' vim* '////plus single quotes
Vim-filesystem-7.4.629-5.el6.x86_64
Device-mapper-libs-1.02.95-3.el6_7.3.x86_64
Vim-minimal-7.2.411-1.8.el6.x86_64
Vim-common-7.4.629-5.el6.x86_64
Sysvinit-tools-2.87-5.dsf.el6.x86_64
Device-mapper-1.02.95-3.el6_7.3.x86_64

.......

View the package details

[Email protected] packages]# Rpm-qi Gnome-python2-extras

See which files the package installs

[Email protected] packages]# RPM-QL Gnome-python2-extras
/usr/lib64/pkgconfig/gnome-python-extras-2.0.pc
/usr/share/doc/gnome-python2-extras-2.25.3
/usr/share/doc/gnome-python2-extras-2.25.3/authors
/usr/share/doc/gnome-python2-extras-2.25.3/changelog
/usr/share/doc/gnome-python2-extras-2.25.3/news
/usr/share/pygtk
/usr/share/pygtk/2.0
/usr/share/pygtk/2.0/defs
/usr/share/pygtk/2.0/defs/gtkhtml2.defs
/usr/share/pygtk/2.0/defs/trayicon.defs

See which package the file is installed on

[Email protected] packages]# rpm-qf/usr/share/pygtk/2.0/defs/gtkhtml2.defs
Gnome-python2-extras-2.25.3-20.el6.x86_64

Or

[email protected] packages]# which vim
/usr/bin/vim
[Email protected] packages]# Rpm-qf/usr/bin/vim
Vim-enhanced-7.4.629-5.el6.x86_64
[Email protected] packages]# RPM-QF ' which vim '
Error:file/mnt/packages/which vim: No file or directory
[[email protected] packages]# RPM-QF ' which vim '////anti-quote
Vim-enhanced-7.4.629-5.el6.x86_64

Linux Command-rpm query package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.