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.
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)- A5% (2)
- B2% (1)
- C2% (1)
- E91% (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.
rpm -qf queries which already-installed package owns a specific file path on the filesystem, not which files are contained within a package.
The -F flag is used to upgrade packages only if an older version is already installed, not to query or list package contents.
rpm -pf is not a valid query option combination - the correct flags for listing files from a package file on disk are -qlp.
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.
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
Community Discussion
No community discussion yet for this question.