Showing posts with label RPM. Show all posts
Showing posts with label RPM. Show all posts

Monday, August 8, 2011

How to find file and RPM relation in Linux?

At times, I need to find where a file comes from. i.e. what package/RPM owns that specific file. In following example, I found two methods to find file-RPM relationship.


[root@servername lib]# yum whatprovides libext4fs.so.2
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase, rhnplugin, security, tmprepo, verify, versionlock
This system is not registered with RHN.
RHN support will be disabled.
Loading mirror speeds from cached hostfile
e4fsprogs-libs-1.41.9-3.el5.i386 : Ext4 filesystem-specific static libraries and headers
Repo : installed
Matched from:
Other : Provides-match: libext4fs.so.2


[root@servername lib]# rpm -qf libext4fs.so.2
e4fsprogs-libs-1.41.9-3.el5