Читать книгу Mastering Linux System Administration - Richard Blum - Страница 107

Inspecting Package Files

Оглавление

Use the ‐q action to perform a simple query on the package management database for installed packages.

$ rpm -q bash bash-4.4.19-12.el8.x86_64 $ rpm -q zsh package zsh is not installed $

There are several options you can add to the query action to obtain more detailed information. Table 5.2 shows a few of the more commonly used query options.

TABLE 5.2: The rpm Command Query Action Options

SHORT OPTION LONG OPTION DESCRIPTION
‐c ‐‐configfiles Lists the names and absolute directory references of package configuration files
‐i ‐‐info Provides detailed information, including version, installation date, and signatures
N/A ‐‐provides Shows what facilities the package provides
‐R ‐‐requires Displays various package requirements (dependencies)
‐s ‐‐state Provides states of the different files in a package, such as normal (installed), not installed, or replaced
N/A ‐‐what‐provides Shows to what package a file belongs

You can also add the ‐i action, which provides a detailed list of information on the package.

$ rpm -qi bash Name : bash Version : 4.4.19 Release : 12.el8 Architecture: x86_64 Install Date: Sat 05 Dec 2020 08:43:49 AM EST Group : Unspecified Size : 6861588 License : GPLv3+ Signature : RSA/SHA256, Tue 21 Jul 2020 12:08:45 PM EDT, Key ID 05b555b38483c65d Source RPM : bash-4.4.19-12.el8.src.rpm Build Date : Tue 21 Jul 2020 12:03:55 PM EDT Build Host : x86-02.mbox.centos.org Relocations : (not relocatable) Packager : CentOS Buildsys <bugs@centos.org> Vendor : CentOS URL : https://www.gnu.org/software/bash Summary : The GNU Bourne Again shell Description : The GNU Bourne Again shell (Bash) is a shell or command language interpreter that is compatible with the Bourne shell (sh). Bash incorporates useful features from the Korn shell (ksh) and the C shell (csh). Most sh scripts can be run by bash without modification. $

From the output of the detailed query, you can see specific information, such as the date the package was installed and a brief description of the package.

Mastering Linux System Administration

Подняться наверх