【rpm】rpm相关的format_str,格式化输出查询的包内容

按照不同标签来查看软件包信息


# export LANG=en_US.UTF-8

# yum info httpd

你可以自由地定义输出格式:

# rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n'   httpd

# rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n'   -p   httpd-2.4.6-88.el7.centos.x86_64.rpm

# rpm -q --qf   '%{summary}\n%{description}\n'   httpd

参考

How to RPM Query for Packages on Linux

https://linoxide.com/linux-command/how-to-rpm-query-packages-on-linux/


rpm -qa and architecture info

https://www.redhat.com/archives/redhat-list/2010-March/029638.html


Querying for RPM package infomation

https://www.ibm.com/support/knowledgecenter/en/SS2MB5_14.1.0/com.ibm.xlf141.bg.doc/install/query_rpm.html


CentOS: List the installed RPMs by date of installation/update?

https://unix.stackexchange.com/questions/2291/centos-list-the-installed-rpms-by-date-of-installation-update?noredirect=1&lq=1

https://books.google.ca/books?id=PrepsktXgScC&pg=PA749&dq=rpm+-q+--qf&hl=zh-CN&sa=X&ved=0ahUKEwjxsZ-KybbhAhWZHDQIHW7yCy8Q6AEIKzAA#v=onepage&q=rpm%20-q%20--qf&f=false

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。