Debianパッケージは、インストール中にいくつかのファイルを作成します。ファイル/ etc / debian_versionを所有しているパッケージを検索するコマンドは次のうちどれですか?
正解:D
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 apt command 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