Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to search a package using the binary name.

for example I want to find rpm package for command "ls" then it should be coreutils-6.9-10.4.i586 for example.

share|improve this question

migrated from stackoverflow.com Sep 27 '11 at 8:49

This question came from our site for professional and enthusiast programmers.

4 Answers 4

The yum command "whatprovides" accepts wildcards. If you're searching for the package that provides as certain file or executable and do not know its full path, use "yum whatprovides */filename".

$ yum whatprovides */ls

coreutils-5.97-23.el5_4.2.x86_64 : The GNU core utilities: a set of tools
                                 : commonly used in shell scripts
Repo        : installed
Matched from:
Filename    : /bin/ls
share|improve this answer
yum provides /bin/ls
repoquery -f /bin/ls

...will both dtrt. Also recent versions of "yum" will automatically do a number of file lookups if you do:

yum provides ls
share|improve this answer

The 'rpm -qf' command should tell you which package owns any installed file.

> whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.g

> rpm -qf /bin/ls
coreutils-5.97-23.el5_6.4
share|improve this answer
    
suppose I dont have the package installed ... how can I get the package name knowing only the binary name ? –  deimus Sep 27 '11 at 6:50

it seems scout bin ls does that

more on scout here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.