101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 23


A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file /etc/debian_version?

Show Answer
Correct Answer: D

To find out which installed package owns a specific file in Debian, you use the dpkg command with the -S (search) option. The correct command for searching which package owns the file /etc/debian_version is 'dpkg -S /etc/debian_version'. This command will return the name of the package that contains the specified file.

Discussion

6 comments
Sign in to comment
linuzOption: D
Jun 4, 2020

The switch is incorrect. The correct command should be dpkg -S /etc/debian_version Giving the output: base-files: /etc/debian_version

cast7omadrid1
Jun 7, 2020

The problem is that instead of putting the -S or similar, it says "" . It's a mistake all over the page.

CuriousLinuxCat
Jul 24, 2021

Whoever comes across this message, know that this website uses: ("") for a hyphen (-) and some other characters that probably has been encoded wrong that makes ("), (`) and (-) look wrong.

penguinx64Option: D
Feb 22, 2021

-S, --search filename-search-pattern... Search for a filename from installed packages.

LazylinuxOption: D
Apr 21, 2022

dpkg -S followed by whatever you want to search for

jeggaOption: D
May 26, 2021

option D is close to the answer. This should be the correct answer: dpkg-query -S /etc/debian_version

McLaba
Mar 30, 2021

no one is correct

NinymoOption: D
Mar 24, 2024

Answer: D