LPIC-1 Exam 101, Part 1 of 2, version 5.0 101-500 Question # 9 Topic 1 Discussion
101-500 Exam Topic 1 Question 9 Discussion:
Question #: 9
Topic #: 1
A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file /etc/debian_version?
The command that searches for packages owning the file /etc/debian_version is dpkg –S /etc/debian_version. The dpkg command is the low-level tool for installing, removing, configuring, and querying Debian packages. The -S or --search option takes a file name or a pattern as an argument and searches for the packages that contain the matching files. The output shows the package name and the file name separated by a colon. For example, running dpkg -S /etc/debian_version will produce the output base-files:/etc/debian_version, indicating that the file /etc/debian_version belongs to the base-files package. The other commands are either invalid or do not perform the desired task. The apt-get command is used to download and install packages from the Debian repositories, but it does not have a search option. The aptcommand is a high-level tool for managing packages, but it does not have a -r option. The find command is used to search for files in the file system, but it does not have a -dpkg option. The apt-file command is used to search for files in the packages available in the Debian repositories, but it requires a subcommand such as search or show before the file name or pattern. References:
Linux Essentials - Linux Professional Institute Certification Programs1
Exam 101 Objectives - Linux Professional Institute2
dpkg(1) - Linux manual page3
apt-get(8) - Linux manual page
apt(8) - Linux manual page
find(1) - Linux manual page
apt-file(1) - Linux manual page
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit