Find the software package that provides the specified command

Source: Internet
Author: User

When there is a command in the system, you can use rpm-qf/path/to/command to find the package for which the command was installed. However, if the command to be used does not exist, how can we find the software package that provides the command.

Yum can solve this problem

# yum help | grep providesprovides       Find what package provides the given value

For example, you need to find the command that provides the genhash command,

# yum provides */genhashkeepalived-1.2.7-3.el6.x86_64 : High Availability monitor built upon LVS, VRRP and service pollersRepo        : CentOS64Matched from:Filename    : /usr/bin/genhash

Note: */or * bin/must be added before the content to be searched; otherwise, the content may not be found.

# yum provides genhash  Warning: 3.0.x versions of yum would erroneously match against filenames. You can use "*/genhash" and/or "*bin/genhash" to get that behaviourNo Matches found

 

This article is from the foolishfish blog, please be sure to keep this source http://foolishfish.blog.51cto.com/3822001/1439302

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.