packages:determine_which_package_a_file_belongs_to
Differences
This shows you the differences between two versions of the page.
packages:determine_which_package_a_file_belongs_to [2016/07/04 15:59] – created peter | packages:determine_which_package_a_file_belongs_to [2019/12/01 11:50] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Packages - Determine which package a file belongs to ====== | ||
- | |||
- | ===== Objective ===== | ||
- | |||
- | Given the pathname to a file on a Debian-based system, to determine the name of the package that file belongs to | ||
- | |||
- | ===== Scenario ===== | ||
- | |||
- | Suppose that, for reasons unknown, the file / | ||
- | |||
- | ===== Method ===== | ||
- | |||
- | The package name can be obtained using the **-S** option of the dpkg command: | ||
- | |||
- | <code bash> | ||
- | dpkg -S / | ||
- | </ | ||
- | |||
- | The argument is a pattern that matches all or part of the pathname you want to search for. It may contain wildcards such as ? and *, with similar (but not identical) semantics to those of a glob pattern. | ||
- | |||
- | ===== Alternatives ===== | ||
- | |||
- | ==== Searching the repository ==== | ||
- | |||
- | The method described above is only applicable to files that are installed locally on the machine that you are querying. | ||
- | |||
- | The package repository already has a copy of each package, so in principle it has all of the information needed to perform a global search for a pathname. | ||
- | |||
- | |Debian| http:// | ||
- | |Ubuntu| http:// | ||
- | |||
- | In both cases the search is limited to recent releases only. | ||
packages/determine_which_package_a_file_belongs_to.1467647988.txt.gz · Last modified: 2020/07/15 09:30 (external edit)