The Magical magic of rpm

Source: Internet
Author: User

Rpm-qf

QUERY OPTIONS
The general form of a RPM query command is

RPM {-q|--query} [select-options] [query-options]

Package SELECTION OPTIONS:

-F,--file file

Query package owning file. (check which package owns file)

RPM-QF [FileName]

It is possible to query which installation package the filename was installed on, which is undoubtedly a boon for the students who want to query the source code, and some tools in Linux have no connection to tool name at all.

For example, if you want to check the source code of Ping, search the source code of Ping on the Internet, or find it on the RPM download website, it will be useful for the tool.

Rpm-qf ' which ping '

[[Email protected] Desktop]# which ping
/bin/ping

[[Email protected] Desktop]# rpm-qf ' which ping '
iputils-20071127-17.el6_4.2.i686

With this combination, it's easy to find the source code

Another magical feature of this command is also mentioned in this blog post.

Http://blog.sina.com.cn/s/blog_6fb8aaeb0100wvw8.html

The Magical magic of rpm

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.