yum whatprovides.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 06 Jun 2016 23:03:28 +0300
changeset 1989 20198cc725e6
parent 1988 736bf9acc20f
child 1990 cfc628f229cd
yum whatprovides.
package-management.rst
--- a/package-management.rst	Thu Jun 02 22:57:23 2016 +0300
+++ b/package-management.rst	Mon Jun 06 23:03:28 2016 +0300
@@ -54,10 +54,18 @@
 
 Find packages a file belong to
 ==============================
-::
+
+Find what package hold file among installed packages::
+
+  $ rpm -qf /usr/bin/free
+  $ zypper search -f stdlib.h
 
-  $ yum whatprovides stdlib.h
-  $ zypper search -f stdlib.h
+Find what package hold file among all packages from enabled repositories::
+
+  $ yum whatprovides '*/stdlib.h'
+
+  $ sudo yum install yum-utils           # old alternative
+  $ repoquery --whatprovides '*bin/grep'
 
 For ``pacman`` package system from ``pkgtools`` package::