Which yum command will you use if you want to find out the name of the package that has the /etc/sysconfig/nfs file?

Which yum command will you use if you want to find out the name of the package that has the
/etc/sysconfig/nfs file?

Which yum command will you use if you want to find out the name of the package that has the
/etc/sysconfig/nfs file?

A.
# yum info /etc/sysconfig/nfs

B.
# yum search /etc/sysconfig/nfs

C.
# yum list installed | grep /etc/sysconfig/nfs

D.
# yum check /etc/sysconfig/nfs

Explanation:
yum list installed [glob_exp1] […]
List the packages specified by args. If an argument does not match the name of an available
package, it is assumed to be a shell-style glob and any matches are printed.
Incorrect:
Not A:
info
Is used to list a description and summary information about available packages

Not B:
search
This is used to find packages when you know something about the package but aren’t sure of it’s
name. By default search will try searching just package names and summaries, but if that “fails” it
will then try descriptions and url.
Not D:check
Checks the local rpmdb and produces information on any problems it finds.



Leave a Reply 4

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


Matt

Matt

yum list installed doesn’t give any path name information, it lists the name of the package. The only one that would work is yum search. So the answer is B. Yum provides is the best tool to use for that search but it isn’t an option.

david

david

yum list installed | grep nfs is ok but C is not correct.
yum search nfs is ok but B is not correct.

hence I don’t think there is any correct answer for this question.

Nwildner

Nwildner

Wrong in many levels. This will list package names and grep /etc/sysconfig/nfs and will find nothing

A correct answer is:

[root@host ~]# yum whatprovides /etc/sysconfig/nfs
1:nfs-utils-1.3.0-0.el7.x86_64 : NFS utilities and supporting clients and daemons for the kernel NFS server
Repo : ol7_latest
Resultado a partir de:
Nome de arquivo : /etc/sysconfig/nfs

James

James

there is no correct answer : yum whatprovides /etc/sysconfig/nfs thi is correct