RPM Application--queries (installed packages and not installed packages)

Source: Internet
Author: User

Query function

Command format rpm {-q|--query} [select-options] [query-options]

RPM Query function is extremely powerful, is one of the most important functions; For a few common examples, more detailed specific, please refer to #man rpm

1, the system has installed the software query

1 Query system installed software

Syntax: RPM-Q software name

Example: [Root@localhost beinan]# rpm-q Gaim

Gaim-1.3.0-1.fc4

View all installed packages in the system, plus a parameter;

[Root@localhost rpms]# Rpm-qa

If paging view, add a pipe | and more command;

[Root@localhost rpms]# Rpm-qa |more

Find a software in all installed packages, such as Gaim, which can be extracted using grep;

[Root@localhost rpms]# Rpm-qa |grep Gaim

The above function is the same as the result of rpm-q gaim output;

2 Find out which package is owned by a file that is already installed

Syntax RPM-QF file name

Note: The absolute path to the filename is indicated

Example:

[Root@localhost rpms]# rpm-qf/usr/lib/libacl.la

Libacl-devel-2.2.23-8

3 Find out where the installed packages are installed

Syntax: RPM-QL software name or rpm RPMQUERY-QL software name

Example:

[Root@localhost rpms]# RPM-QL Lynx

[Root@localhost rpms]# RPMQUERY-QL Lynx

4 Query The information of an installed package

Syntax format: RPM-QI software name

Example:

[Root@localhost rpms]# Rpm-qi Lynx

5 Check the configuration file of the installed software

Syntax format: RPM-QC software name

Example:

[Root@localhost rpms]# RPM-QC Lynx

6 View a document installation location where the software has been installed

Syntax format: RPM-QD software name

Example:

[Root@localhost rpms]# RPM-QD Lynx

7 Check the software packages and files that are on the installation

Syntax format: RPM-QR software name

Example:

[Root@localhost beinan]# RPM-QR Rpm-python

A summary of the query installed software: For a package has been installed, we can combine a series of parameters, such as Rpm-qil, such as:

[Root@localhost rpms]# Rpm-qil Lynx

2, for the installation of the package is not installed view:

The prerequisite for viewing is that you have a. rpm file, that is, a view of the existing software file.rpm;

1) To view the use of a package, version and other information;

Syntax: Rpm-qpi file.rpm

Example:

[Root@localhost rpms]# Rpm-qpi lynx-2.8.5-23.i386.rpm

2 View the files contained in a package;

Syntax: RPM-QPL file.rpm

Example:

[Root@localhost rpms]# RPM-QPL lynx-2.8.5-23.i386.rpm

3 View the location of the package's documentation;

Syntax: RPM-QPD file.rpm

Example:

[Root@localhost rpms]# RPM-QPD lynx-2.8.5-23.i386.rpm

4 View the configuration file of a package;

Syntax: RPM-QPC file.rpm

Example:

[Root@localhost rpms]# rpm-qpc lynx-2.8.5-23.i386.rpm

5 View the dependencies of a package

Syntax: RPM-QPR file.rpm

Example:

[Root@localhost archives]# RPM-QPR yumex_0.42-3.0.fc4_noarch.rpm

/bin/bash

/usr/bin/python

Config (yumex) = 0.42-3.0.fc4

Pygtk2

Pygtk2-libglade

Rpmlib (compressedfilenames) <= 3.0.4-1

Rpmlib (payloadfileshaveprefix) <= 4.0-1

UserMode

Yum >= 2.3.2

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.