rpm

-q --query
-i --info
-R --required
```
[linuxstudy@xxxx ~]$ rpm -q firefox
firefox-102.12.0-1.el7.centos.x86_64
[linuxstudy@xxxx ~]$ rpm -qi firefox
Name        : firefox
Version     : 102.12.0
Release     : 1.el7.centos
Architecture: x86_64
Install Date: 2023年08月03日 20時17分06秒
Group       : Unspecified
Size        : 286377547
License     : MPLv1.1 or GPLv2+ or LGPLv2+
Signature   : RSA/SHA256, 2023年06月26日 20時55分52秒, Key ID 24c6a8a7f4a80eb5
Source RPM  : firefox-102.12.0-1.el7.centos.src.rpm
Build Date  : 2023年06月20日 21時29分02秒
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : https://www.mozilla.org/firefox/
Summary     : Mozilla Firefox Web browser
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.
[linuxstudy@xxxx ~]$ rpm -qR firefox | head -20
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/bin/bash
/usr/bin/sh
ld-linux-x86-64.so.2()(64bit)
ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
libX11-xcb.so.1()(64bit)
libX11.so.6()(64bit)
libXcomposite.so.1()(64bit)
libXcursor.so.1()(64bit)
libXdamage.so.1()(64bit)
libXext.so.6()(64bit)
libXfixes.so.3()(64bit)
libXi.so.6()(64bit)
libXrandr.so.2()(64bit)
libXrender.so.1()(64bit)
libXtst.so.6()(64bit)
libasound.so.2()(64bit)
[linuxstudy@xxxx ~]$ rpm -ql firefox | head -20
/etc/firefox
/etc/firefox/pref
/usr/bin/firefox
/usr/lib64/firefox
/usr/lib64/firefox/LICENSE
/usr/lib64/firefox/application.ini
/usr/lib64/firefox/browser/chrome
/usr/lib64/firefox/browser/chrome/icons
/usr/lib64/firefox/browser/chrome/icons/default
/usr/lib64/firefox/browser/chrome/icons/default/default128.png
/usr/lib64/firefox/browser/chrome/icons/default/default16.png
/usr/lib64/firefox/browser/chrome/icons/default/default32.png
/usr/lib64/firefox/browser/chrome/icons/default/default48.png
/usr/lib64/firefox/browser/chrome/icons/default/default64.png
/usr/lib64/firefox/browser/defaults/preferences
/usr/lib64/firefox/browser/extensions
/usr/lib64/firefox/browser/extensions/langpack-ach@firefox.mozilla.org.xpi
/usr/lib64/firefox/browser/extensions/langpack-af@firefox.mozilla.org.xpi
/usr/lib64/firefox/browser/extensions/langpack-an@firefox.mozilla.org.xpi
/usr/lib64/firefox/browser/extensions/langpack-ar@firefox.mozilla.org.xpi
```
-p --package  インストール済みではないrpmファイルを指定
```
[linuxstudy@xxxx ~]$ rpm -qp /home/linuxstudy/zsh-5.0.2-34.el7_8.2.x86_64.rpm
zsh-5.0.2-34.el7_8.2.x86_64
[linuxstudy@xxxx ~]$ rpm -qpi /home/linuxstudy/zsh-5.0.2-34.el7_8.2.x86_64.rpmName        : zsh
Version     : 5.0.2
Release     : 34.el7_8.2
Architecture: x86_64
Install Date: (not installed)
Group       : System Environment/Shells
Size        : 5860430
License     : MIT
Signature   : RSA/SHA256, 2020年04月08日 23時41分00秒, Key ID 24c6a8a7f4a80eb5
Source RPM  : zsh-5.0.2-34.el7_8.2.src.rpm
Build Date  : 2020年04月07日 23時38分13秒
Build Host  : x86-02.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://zsh.sourceforge.net/
Summary     : Powerful interactive shell
Description :
The zsh shell is a command interpreter usable as an interactive login
shell and as a shell script command processor.  Zsh resembles the ksh
shell (the Korn shell), but includes many enhancements.  Zsh supports
command line editing, built-in spelling correction, programmable
command completion, shell functions (with autoloading), a history
mechanism, and more.
```
-c --configfiles
```
[linuxstudy@xxxx ~]$ rpm -qpc /home/linuxstudy/zsh-5.0.2-34.el7_8.2.x86_64.rpm
/etc/skel/.zshrc
/etc/zlogin
/etc/zlogout
/etc/zprofile
/etc/zshenv
/etc/zshrc
```
-d --docfiles
```
[linuxstudy@xxxx ~]$ rpm -qpd /home/linuxstudy/zsh-5.0.2-34.el7_8.2.x86_64.rpm | head -10
/usr/share/doc/zsh-5.0.2/BUGS
/usr/share/doc/zsh-5.0.2/CONTRIBUTORS
/usr/share/doc/zsh-5.0.2/FAQ
/usr/share/doc/zsh-5.0.2/FEATURES
/usr/share/doc/zsh-5.0.2/LICENCE
/usr/share/doc/zsh-5.0.2/MACHINES
/usr/share/doc/zsh-5.0.2/NEWS
/usr/share/doc/zsh-5.0.2/README
/usr/share/doc/zsh-5.0.2/completion-style-guide
/usr/share/doc/zsh-5.0.2/zsh-development-guide
```
-l --list  全てのファイルを表示
-f --file  指定したファイルを含むパッケージの検索
```
[linuxstudy@xxxx ~]$ rpm -ql firefox | head -10
/etc/firefox
/etc/firefox/pref
/usr/bin/firefox
/usr/lib64/firefox
/usr/lib64/firefox/LICENSE
/usr/lib64/firefox/application.ini
/usr/lib64/firefox/browser/chrome
/usr/lib64/firefox/browser/chrome/icons
/usr/lib64/firefox/browser/chrome/icons/default
/usr/lib64/firefox/browser/chrome/icons/default/default128.png
[linuxstudy@xxxx ~]$ rpm -qf /usr/lib64/firefox/browser/chrome/icons/default/default128.png
firefox-102.12.0-1.el7.centos.x86_64
```