LX0-103 · Question #22
Which RPM command will output the name of the package which installed the file /etc/exports?
The correct answer is B. rpm -qf /etc/exports. The rpm -qf command queries the RPM database to identify which installed package owns a specified file path.
Question
Which RPM command will output the name of the package which installed the file /etc/exports?
Options
- Arpm -F /etc/exports
- Brpm -qf /etc/exports
- Crpm -Kl /etc/exports
- Drpm -qp /etc/exports
- Erpm -qi /etc/exports
How the community answered
(30 responses)- A3% (1)
- B90% (27)
- E7% (2)
Why each option
The rpm -qf command queries the RPM database to identify which installed package owns a specified file path.
rpm -F is the freshen operation, which upgrades already-installed packages from provided package files, and performs no file ownership query.
The -q flag puts rpm into query mode and the -f flag specifies a file path as the target, causing rpm to search the installed package database for the package that placed that file on the system. This reverse file-to-package lookup is the correct approach for identifying package ownership of /etc/exports.
rpm -K verifies the cryptographic signature of a package file; combining it with -l does not produce a file-to-package query.
rpm -qp queries metadata from an uninstalled .rpm package archive file, not a file already present on the filesystem.
rpm -qi displays information about an installed package referenced by its package name, not by a filesystem file path.
Concept tested: RPM query to find package owning a file
Source: https://rpm.org/documentation.html
Topics
Community Discussion
No community discussion yet for this question.