如何RPM列表文件

时间:2020-01-09 10:40:38  来源:igfitidea点击:

如何列出存储在rpm文件中的文件?

您需要如下使用rpm命令:

rpm命令示例

.rpm文件的语法如下:

# rpm -qpl file.rpm

在此示例中,列出存储在httpd-2.2.3-31.el5_4.2.x86_64.rpm中的rpm文件,执行:

# rpm -qlp httpd-2.2.3-31.el5_4.2.x86_64.rpm

输出示例:

/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.d/README
/etc/httpd/conf.d/proxy_ajp.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/httpd/logs
/etc/httpd/modules
/etc/httpd/run
/etc/logrotate.d/httpd
....
..
..
/var/www/icons/uu.png
/var/www/icons/uuencoded.gif
/var/www/icons/uuencoded.png
/var/www/icons/world1.gif
/var/www/icons/world1.png
/var/www/icons/world2.gif
/var/www/icons/world2.png

如何列出已安装软件包的文件?

您需要使用rpm命令,如下所示:

# rpm -ql packageName
# rpm -ql samba
# rpm -ql httpd