RPM命令详解2---查询&验证

一、RPM查询

rpm {-q|–query} [select-options] [query-options]

select-options
[PACKAGE_NAME] [-a,–all] [-f,–file FILE]
[-g,–group GROUP] {-p,–package PACKAGE_FILE]
[–hdrid SHA1] [–pkgid MD5] [–tid TID]
[–querybynumber HDRNUM] [–triggeredby PACKAGE_NAME]
[–whatprovides CAPABILITY] [–whatrequires CAPABILITY]

query-options
[–changelog] [-c,–configfiles] [–conflicts]
[-d,–docfiles] [–dump] [–filesbypkg] [-i,–info]
[–last] [-l,–list] [–obsoletes] [–provides]
[–qf,–queryformat QUERYFMT] [-R,–requires]
[–scripts] [-s,–state] [–triggers,–triggerscripts]

rpm -q erlang-25.3.2.3-1.el7.x86_64 (包名)

[root@master01 yiifung]# rpm -q erlang
erlang-25.3.2.3-1.el7.x86_64
[root@master01 yiifung]# rpm -q erlang-25.3.2.3-1.el7.x86_64
erlang-25.3.2.3-1.el7.x86_64
[root@master01 yiifung]# 

rpm -qa 查询所有已经安装的软件

[root@master01 yiifung]# rpm -q erlang
erlang-25.3.2.3-1.el7.x86_64
[root@master01 yiifung]# rpm -q erlang-25.3.2.3-1.el7.x86_64
erlang-25.3.2.3-1.el7.x86_64
[root@master01 yiifung]# rpm -qa | more
libreport-cli-2.1.11-53.el7.centos.x86_64
sg3_utils-libs-1.37-19.el7.x86_64
libgnome-keyring-3.12.0-1.el7.x86_64
javapackages-tools-3.4.1-11.el7.noarch
smartmontools-7.0-2.el7.x86_64
telepathy-filesystem-0.0.2-6.el7.noarch
sane-backends-1.0.24-12.el7.x86_64

rpm -qi erlang-25.3.2.3-1.el7.x86_64 (包名) 查询详细信息

[root@master01 yiifung]# rpm -qi erlang-25.3.2.3-1.el7.x86_64
Name        : erlang
Version     : 25.3.2.3
Release     : 1.el7
Architecture: x86_64
Install Date: Thu 27 Jul 2023 07:26:16 AM PDT
Group       : Development/Languages
Size        : 40446860
License     : ASL 2.0
Signature   : (none)
Source RPM  : erlang-25.3.2.3-1.el7.src.rpm
Build Date  : Fri 30 Jun 2023 06:09:49 AM PDT
Build Host  : 00786ce1939e
Relocations : (not relocatable)
Vendor      : VMware, Inc.
URL         : https://www.erlang.org
Summary     : Minimalistic Erlang/OTP distribution that provides just enough for running RabbitMQ
Description :
This is a minimal packaging of Erlang produced by VMware, Inc. to support
running RabbitMQ. Compared to the community Erlang packaging it is
monolithic, has fewer dependencies, and has lower disk and memory
overhead. Many applications from Erlang Open Telecom Platform (OTP)
have been removed. The following applications remain: asn1, compiler,
crypto, erl_interface, erts, inets, kernel, mnesia, os_mon,
public_key, reltool, runtime_tools, sasl, snmp, ssl, stdlib,
syntax_tools and xmerl.
[root@master01 yiifung]# 

rpm -ql erlang-25.3.2.3-1.el7.x86_64 (包名) 列出该软件所有的文件和目录

rpm -qc erlang-25.3.2.3-1.el7.x86_64 (包名) 列出该软件所有的配置文件

rpm -qd erlang-25.3.2.3-1.el7.x86_64 (包名) 列出该软件所有的说明文件(man 有关)

二、RPM数据库

… …

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值