rpm必知100问:如何查询RPM包的文件列表?

rpm命令100问:如何查询RPM包的文件列表?

一旦你有了 RPM 文件,就可以使用 rpm -qlp 命令来查看该 RPM 包中的文件列表。

这里的 -qlp 参数分别表示:

  • -q: 查询模式。
  • -l: 列出软件包中的文件。
  • -p: 指定要查询的是一个未安装的 RPM 包文件。

假设下载的 RPM 文件名为 sysstat-11.7.3-13.0.1.an8.x86_64.rpm,你可以运行:

  • rpm -qlp sysstat-11.7.3-13.0.1.an8.x86_64.rpm
[root@localhost ~]# rpm -qlp sysstat-11.7.3-13.0.1.an8.x86_64.rpm
/etc/profile.d/colorsysstat.csh
/etc/profile.d/colorsysstat.sh
/etc/sysconfig/sysstat
/etc/sysconfig/sysstat.ioconf
/usr/bin/cifsiostat
/usr/bin/iostat
/usr/bin/mpstat
/usr/bin/pidstat
/usr/bin/sadf
/usr/bin/sar
/usr/bin/tapestat
/usr/lib/.build-id
/usr/lib/.build-id/23
/usr/lib/.build-id/23/58991e4ff8544dec98af9ed82c587b3a585626
/usr/lib/.build-id/32
/usr/lib/.build-id/32/053d4e335fdd7bb0a755685791e150e503f77a
/usr/lib/.build-id/34
/usr/lib/.build-id/34/7937b122cfebeff46dcc0f6fe13bcbee2e5781
/usr/lib/.build-id/36
/usr/lib/.build-id/36/d4c9552698264829aa6e6adb57db5a0b41e190
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/3517ff43bc1271bc7513b339d17ec98f2e11b4
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/eff40ffd98ab08140a60d55ced56dcb59a9204
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/7de00918d064ca17f3e8baa5d3b363b7f7c464
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/3a85c9ebd49c24a4dabfa2ab68b47467ffe91b
/usr/lib/systemd/system/sysstat-collect.service
/usr/lib/systemd/system/sysstat-collect.timer
/usr/lib/systemd/system/sysstat-summary.service
/usr/lib/systemd/system/sysstat-summary.timer
/usr/lib/systemd/system/sysstat.service
/usr/lib64/sa
/usr/lib64/sa/sa1
/usr/lib64/sa/sa2
/usr/lib64/sa/sadc
/usr/share/locale/af/LC_MESSAGES/sysstat.mo
/usr/share/locale/cs/LC_MESSAGES/sysstat.mo
/usr/share/locale/da/LC_MESSAGES/sysstat.mo
/usr/share/locale/de/LC_MESSAGES/sysstat.mo
/usr/share/locale/eo/LC_MESSAGES/sysstat.mo
/usr/share/locale/es/LC_MESSAGES/sysstat.mo
/usr/share/locale/eu/LC_MESSAGES/sysstat.mo
/usr/share/locale/fi/LC_MESSAGES/sysstat.mo
/usr/share/locale/fr/LC_MESSAGES/sysstat.mo
/usr/share/locale/fur/LC_MESSAGES/sysstat.mo
/usr/share/locale/gl/LC_MESSAGES/sysstat.mo
/usr/share/locale/hr/LC_MESSAGES/sysstat.mo
/usr/share/locale/hu/LC_MESSAGES/sysstat.mo
/usr/share/locale/id/LC_MESSAGES/sysstat.mo
/usr/share/locale/it/LC_MESSAGES/sysstat.mo
/usr/share/locale/ja/LC_MESSAGES/sysstat.mo
/usr/share/locale/ko/LC_MESSAGES/sysstat.mo
/usr/share/locale/ky/LC_MESSAGES/sysstat.mo
/usr/share/locale/lv/LC_MESSAGES/sysstat.mo
/usr/share/locale/mt/LC_MESSAGES/sysstat.mo
/usr/share/locale/nb/LC_MESSAGES/sysstat.mo
/usr/share/locale/nl/LC_MESSAGES/sysstat.mo
/usr/share/locale/nn/LC_MESSAGES/sysstat.mo
/usr/share/locale/pl/LC_MESSAGES/sysstat.mo
/usr/share/locale/pt/LC_MESSAGES/sysstat.mo
/usr/share/locale/pt_BR/LC_MESSAGES/sysstat.mo
/usr/share/locale/ro/LC_MESSAGES/sysstat.mo
/usr/share/locale/ru/LC_MESSAGES/sysstat.mo
/usr/share/locale/sk/LC_MESSAGES/sysstat.mo
/usr/share/locale/sr/LC_MESSAGES/sysstat.mo
/usr/share/locale/sv/LC_MESSAGES/sysstat.mo
/usr/share/locale/tr/LC_MESSAGES/sysstat.mo
/usr/share/locale/uk/LC_MESSAGES/sysstat.mo
/usr/share/locale/vi/LC_MESSAGES/sysstat.mo
/usr/share/locale/zh_CN/LC_MESSAGES/sysstat.mo
/usr/share/locale/zh_TW/LC_MESSAGES/sysstat.mo
/usr/share/man/man1/cifsiostat.1.gz
/usr/share/man/man1/iostat.1.gz
/usr/share/man/man1/mpstat.1.gz
/usr/share/man/man1/pidstat.1.gz
/usr/share/man/man1/sadf.1.gz
/usr/share/man/man1/sar.1.gz
/usr/share/man/man1/tapestat.1.gz
/usr/share/man/man5/sysstat.5.gz
/usr/share/man/man8/sa1.8.gz
/usr/share/man/man8/sa2.8.gz
/usr/share/man/man8/sadc.8.gz
/var/log/sa
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值