LX0-103 · Question #23
How do you get a list of files that have been installed from a dpkg package?
The correct answer is E. dpkg-L pkgname. The dpkg -L command lists all files that were installed onto the system by a named package.
Question
How do you get a list of files that have been installed from a dpkg package?
Options
- Adpkg-I pkgname
- Bdpkg-C pkgname
- Cdpkg-s pkgname
- Ddpkg-S pkgname
- Edpkg-L pkgname
How the community answered
(36 responses)- B8% (3)
- C3% (1)
- D3% (1)
- E86% (31)
Why each option
The dpkg -L command lists all files that were installed onto the system by a named package.
dpkg -I (--info) extracts and displays metadata from a .deb archive file directly, not from an already-installed package's file list.
dpkg -C (--audit) checks installed packages for inconsistencies or broken states and does not list individual installed files.
dpkg -s (--status) shows the installation status and metadata fields of a package but does not enumerate the files the package installed.
dpkg -S (--search) searches which package owns a given filename pattern, which is the reverse operation of listing all files belonging to a package.
The dpkg -L (--listfiles) option queries the local dpkg database and outputs the full path of every file that was placed on the filesystem by the specified installed package. This is the correct command for auditing which files belong to a package on Debian-based systems.
Concept tested: dpkg -L to list files from an installed package
Source: https://man7.org/linux/man-pages/man1/dpkg.1.html
Topics
Community Discussion
No community discussion yet for this question.