nerdexam
CompTIA

LX0-103 · Question #107

Which command will list all the files installed from the RPM package file named, vorbis-tools- 1.1 .i386.rpm?

The correct answer is E. rpm-qlp vorbis-tools-1.1.1386.rpm. To list all files contained in an uninstalled RPM package file on disk, combine the rpm query (-q), list (-l), and package-file (-p) flags as rpm -qlp.

Linux Installation and Package Management

Question

Which command will list all the files installed from the RPM package file named, vorbis-tools- 1.1 .i386.rpm?

Options

  • Arpm-qfvorbis-tools-1.1 .i386.rpm
  • Brpm -F vorbis-tools-1.1 .i386.rpm
  • Crpm -pf vorbis-tools-1.1 .i386.rpm
  • Drpm -ql vorbis-tools-1.1.1386.rpm
  • Erpm-qlp vorbis-tools-1.1.1386.rpm

How the community answered

(44 responses)
  • A
    5% (2)
  • B
    2% (1)
  • C
    2% (1)
  • E
    91% (40)

Why each option

To list all files contained in an uninstalled RPM package file on disk, combine the rpm query (-q), list (-l), and package-file (-p) flags as rpm -qlp.

Arpm-qfvorbis-tools-1.1 .i386.rpm

rpm -qf queries which already-installed package owns a specific file path on the filesystem, not which files are contained within a package.

Brpm -F vorbis-tools-1.1 .i386.rpm

The -F flag is used to upgrade packages only if an older version is already installed, not to query or list package contents.

Crpm -pf vorbis-tools-1.1 .i386.rpm

rpm -pf is not a valid query option combination - the correct flags for listing files from a package file on disk are -qlp.

Drpm -ql vorbis-tools-1.1.1386.rpm

rpm -ql lists files for an already-installed package by its name in the database, and without the -p flag it cannot read from an uninstalled .rpm file on disk.

Erpm-qlp vorbis-tools-1.1.1386.rpmCorrect

The rpm -qlp command combines query (-q), list (-l), and package-file (-p) flags, instructing rpm to read the specified .rpm file directly and enumerate all files it would install. The -p flag is essential because without it, rpm queries the installed package database rather than a local package file.

Concept tested: RPM query flags for listing files in an uninstalled package file

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

Topics

#RPM#rpm -qlp#package query#package contents

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice