On Debian systems (and derivatives):
$ dpkg --search /bin/ls
coreutils: /bin/ls
That is, the file /bin/ls
belongs to the Debian package named coreutils
.
But this only works if the package is installed. What if it's not?
debianfilenamespackage-management
On Debian systems (and derivatives):
$ dpkg --search /bin/ls
coreutils: /bin/ls
That is, the file /bin/ls
belongs to the Debian package named coreutils
.
But this only works if the package is installed. What if it's not?
Best Answer
apt-file
apt-file
provides the feature of searching for a package providing a binary (like Debian or Ubuntu), it is not installed by default but in the repositories.You may want to update once before searching...
For example, let's search for the not installed binary
mysqldump
:It's also possible to list the contents of a (not-installed) package:
yum
yum
accepts the commandwhatprovides
(orprovides
) to search for installed or not installed binaries:Again, the not installed
mysqldump
:zypper
zypper
'ssearch
command can check file lists when used with the-f
option.Webpin provides a webbased solution, there is even a script for the command-line.
pkgfile
Available as
pkgtools
forpacman
based systems. Provides a similar search feature like the others above: