Below command can be used for finding the rpm package version and its architecture.
Below example output of above command. As seen below command shows httpd rpm version and its architecture.
Alternatively below command can also be used for better formatting of the output.
Below is example output of above command.
Products to which Article Applies
https://rpm.org/user_doc/query_format.html
rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n' | grep -i <rpm name>
Below example output of above command. As seen below command shows httpd rpm version and its architecture.
#rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n' | grep -i httpd
httpd-tools-2.2.15-60.0.1.el6_9.5 x86_64
httpd-manual-2.2.15-60.0.1.el6_9.5 noarch
httpd-2.2.15-60.0.1.el6_9.5 x86_64
httpd-tools-2.2.15-60.0.1.el6_9.5 x86_64
httpd-manual-2.2.15-60.0.1.el6_9.5 noarch
httpd-2.2.15-60.0.1.el6_9.5 x86_64
Alternatively below command can also be used for better formatting of the output.
rpm -q <rpm name> --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'
Below is example output of above command.
# rpm -q httpd --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'
httpd-2.2.15-60.0.1.el6_9.5 (x86_64)
httpd-2.2.15-60.0.1.el6_9.5 (x86_64)
Products to which Article Applies
All Linux Environments
Additional References
https://rpm.org/user_doc/query_format.html
tarun boyella
No comments:
Post a Comment