nerdexam
CompTIA

XK0-004 · Question #514

A junior administrator needs to display information for an RPM package that contains software from an external provider. Which of the following commands will display the package information?

The correct answer is B. rpm -qp package.noarch.rpm. To query metadata from an RPM package file that has not yet been installed, the -qp flag combination is required to target the local package file directly.

System Management

Question

A junior administrator needs to display information for an RPM package that contains software from an external provider. Which of the following commands will display the package information?

Options

  • Arpm -vp package.noarch.rpm
  • Brpm -qp package.noarch.rpm
  • Crpm -qf package.noarch.rpm
  • Drpm -qi package.noarch.rpm

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    91% (30)
  • C
    6% (2)

Why each option

To query metadata from an RPM package file that has not yet been installed, the -qp flag combination is required to target the local package file directly.

Arpm -vp package.noarch.rpm

The -v flag enables verbose output for operations like install or verify; combined with -p it does not produce a standard package information summary the way -qp does.

Brpm -qp package.noarch.rpmCorrect

The rpm -qp option queries a local package file (the -p flag means 'package file') rather than the installed package database. Running rpm -qp package.noarch.rpm displays the package name, version, architecture, and description from the package header without requiring it to be installed first, which is exactly what is needed for an externally provided RPM.

Crpm -qf package.noarch.rpm

rpm -qf (file query) is used to determine which already-installed package owns a specific file on the filesystem, not to inspect an uninstalled .rpm file.

Drpm -qi package.noarch.rpm

rpm -qi queries information about a package that is already installed in the RPM database; it will fail or return no results for a package file that has not been installed yet.

Concept tested: RPM package file query before installation

Source: https://rpm.org/documentation.html

Topics

#RPM#package management#rpm flags#package query

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice