Which rpm command can be used to find the package that owns the /etc/rsyslog.conf file?

Which rpm command can be used to find the package that owns the /etc/rsyslog.conf file?

Which rpm command can be used to find the package that owns the /etc/rsyslog.conf file?

A.
rpm –query /etc/rsyslog.conf

B.
rpm –gf /etc/rsyslog.conf

C.
rpm –q1 /etc/rsyslog.conf

D.
rpm –q /etc/rsyslog.conf

Explanation:
Package Selection Optionsinclude:
-f <file>
Query package owning <file>
Note:
rpm -q — What does it do?
One of the nice things about using RPM is that the packages you manage don’t end up going into
some kind of black hole. Nothing would be worse than to install, upgrade, and erase several
different packages and not have a clue as to what’s on your system. In fact, RPM’s query function
can help you get out of sticky situations like:
*You’re poking around your system, and you come across a file that you just can’t identify. Where
did it come from?

*Your friend sends you a package file, and you have no idea what the package does, what it
installs, or where it originally came from.
*You know that you installed XFree86 a couple months ago, but you don’t know what version, and
you can’t find any documentation on it.
The list could go on, but you get the idea. The rpm -q command is what you need. If you’re the
kind of person that doesn’t like to have more options than you know what to do with, rpm -q might
look imposing. But fear not. Once you have a handle on the basic structure of an RPM query, it’ll
be a piece of cake.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Matt

Matt

rpm –qf /etc/rsyslog.conf

q not g

david

david

# rpm -qf /etc/rsyslog.conf
rsyslog-5.8.10-8.0.1.el6.i686