nerdexam
CompTIA

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.

Linux Installation and Package Management

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)
  • B
    8% (3)
  • C
    3% (1)
  • D
    3% (1)
  • E
    86% (31)

Why each option

The dpkg -L command lists all files that were installed onto the system by a named package.

Adpkg-I pkgname

dpkg -I (--info) extracts and displays metadata from a .deb archive file directly, not from an already-installed package's file list.

Bdpkg-C pkgname

dpkg -C (--audit) checks installed packages for inconsistencies or broken states and does not list individual installed files.

Cdpkg-s pkgname

dpkg -s (--status) shows the installation status and metadata fields of a package but does not enumerate the files the package installed.

Ddpkg-S pkgname

dpkg -S (--search) searches which package owns a given filename pattern, which is the reverse operation of listing all files belonging to a package.

Edpkg-L pkgnameCorrect

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

#dpkg#dpkg -L#package files#Debian packages

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice