how to find which package certain command belongs to on centos?

Posted by hugemeow on Super User See other posts from Super User or by hugemeow
Published on 2012-08-28T02:19:15Z Indexed on 2012/08/28 3:40 UTC
Read the original article Hit count: 515

for example i can easily find locate command belongs to mlocate.i386 package.

yum search locate
mlocate.i386 : An utility for finding files by name
[mirror@home /]$ rpm -qa | grep locate
mlocate-0.15-1.el5.1

yum search updatedb
Loaded plugins: fastestmirror, protectbase
0 packages excluded due to repository protections
=========================================== Matched: updatedb ===========================================
mlocate.i386 : An utility for finding files by name

but it's not so easy to find which package free command belongs to:

yum search free   // this command just returns too much informationy 
rpm -qa | grep free
freetype-2.2.1-31.el5_8.1   // obviously not the package by which free command is installed

so is there any convinent way to know which package a specific command belongs to on linux? for example centos or some other distributions:)

© Super User or respective owner

Related posts about linux

Related posts about command-line