nerdexam
Linux_Foundation

LFCS · Question #835

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 is used to query the RPM database to determine which installed package owns a specific file.

Submitted by khalil_dz· Apr 18, 2026Essential Commands

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

(31 responses)
  • A
    3% (1)
  • B
    94% (29)
  • C
    3% (1)

Why each option

The `rpm -qf` command is used to query the RPM database to determine which installed package owns a specific file.

Arpm -F /etc/exports

The `rpm -F` command is used to "freshen" or update an installed package, not to identify which package owns a file.

Brpm -qf /etc/exportsCorrect

The `rpm -qf /etc/exports` command is used to query the RPM database for the name of the installed package that owns the specified file `/etc/exports`. The `q` signifies a query operation, and `f` specifies querying by file.

Crpm -Kl /etc/exports

`rpm -Kl` is not a valid or standard option combination for identifying a package by file; `-K` is for checking package signatures, and `-l` lists files *in* a known package.

Drpm -qp /etc/exports

The `rpm -qp` command is used to query an uninstalled RPM package file (e.g., a `.rpm` file) for information, not to find the owner of an already installed file on the system.

Erpm -qi /etc/exports

The `rpm -qi` command displays general information about an *already known* installed package, not to determine the package name from a file path.

Concept tested: RPM package query by file

Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-rpm_and_yum#sec-Querying_RPM_Packages

Topics

#RPM Package Manager#Package Management#File Ownership#Querying Packages

Community Discussion

No community discussion yet for this question.

Full LFCS Practice