Main Menu

Search

LINUX: How to Check To Which RPM A File Belongs To On Linux Hosts ("rpm" Command)?

In Linux Environments there may be usecases where you want to check a file and see which rpm it belongs to. Below rpm command can be used to check which rpm a particular file belongs to.

rpm -qi --whatprovides <filename>

Below is example snippet of above command. In this case we are checking the /usr/sbin/httpd.event file. As seen in the output it corresponds to httpd rpm.


# rpm -qi --whatprovides /usr/sbin/httpd
Name        : httpd                        Relocations: (not relocatable)
Version     : 2.2.15                            Vendor: Oracle America
Release     : 60.0.1.el6_9.5                Build Date: Tue 15 Aug 2017 03:13:36 PM PDT
Install Date: Fri 08 Sep 2017 09:35:17 AM PDT      Build Host: x86-ol6-builder-06.us.oracle.com
Group       : System Environment/Daemons    Source RPM: httpd-2.2.15-60.0.1.el6_9.5.src.rpm
Size        : 3169092                          License: ASL 2.0
Signature   : RSA/8, Tue 15 Aug 2017 03:13:54 PM PDT, Key ID 72f97b74ec551f03
URL         : http://httpd.apache.org/
Summary     : Apache HTTP Server
Description :
The Apache HTTP Server is a powerful, efficient, and extensible
web server.

Products to which Article Applies
All Linux Environments

Additional References

https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch05s02s05.html

 



tarun boyella

No comments:

Post a Comment