【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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值