Skip to main content
added 421 characters in body
Source Link
Marcus Müller
  • 51.5k
  • 4
  • 79
  • 121

yum has been largely superseded by dnf on modern Fedora/RedHat-based Linux distributions; see below.

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

dnf

dnf has a repoquery subcommand, which you can use similarly to yum whatprovides:

dnf repoquery --whatprovides /path/to/file

For example:

$ dnf repoquery --whatprovides '*/mysqldump'
mariadb-3:10.5.22-1.el9_2.alma.1.x86_64
mysql-0:8.0.36-1.el9_3.x86_64

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

yum has been largely superseded by dnf on modern Fedora/RedHat-based Linux distributions; see below.

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

dnf

dnf has a repoquery subcommand, which you can use similarly to yum whatprovides:

dnf repoquery --whatprovides /path/to/file

For example:

$ dnf repoquery --whatprovides '*/mysqldump'
mariadb-3:10.5.22-1.el9_2.alma.1.x86_64
mysql-0:8.0.36-1.el9_3.x86_64
added 65 characters in body
Source Link
llua
  • 7.1k
  • 27
  • 31

'szypper does include the command's what-providessearch and concerning the manual, this should also search throughcommand can check file lists when used with the contents of not installed packages. Apparently, it does not work like intended. There is a request for this feature-f option.

zypper se -f /bin/mksh
Loading repository data...
Reading installed packages...

S | Name | Summary           | Type   
--+------+-------------------+--------
  | mksh | MirBSD Korn Shell | package

'szypper does include the command what-provides and concerning the manual, this should also search through the contents of not installed packages. Apparently, it does not work like intended. There is a request for this feature.

zypper's search command can check file lists when used with the -f option.

zypper se -f /bin/mksh
Loading repository data...
Reading installed packages...

S | Name | Summary           | Type   
--+------+-------------------+--------
  | mksh | MirBSD Korn Shell | package

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.

apt-file search <path-to-file>

You may want to update once before searching...

apt-file update 

For example, let's search for the not installed binary mysqldump:

$ apt-file search /usr/bin/mysqldump

mysql-client-5.1: /usr/bin/mysqldump
mysql-client-5.1: /usr/bin/mysqldumpslow
mysql-cluster-client-5.1: /usr/bin/mysqldump
mysql-cluster-client-5.1: /usr/bin/mysqldumpslow

It's also possible to list the contents of a (not-installed) package:

$ apt-file list mysql-client-5.1

mysql-client-5.1: /usr/bin/innochecksum
mysql-client-5.1: /usr/bin/innotop
mysql-client-5.1: /usr/bin/myisam_ftdump
mysql-client-5.1: /usr/bin/mysql_client_test
...

yum

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

yum whatprovides <path-to-file>

Again, the not installed mysqldump:

$ yum whatprovides /usr/bin/mysqldump

mysql-5.1.51-2.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

mysql-5.1.51-1.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

zypper

'szypper does include the command what-provides and concerning the manual, this should also search through the contents of not installed packages. Apparently, it does not work like intended. There is a request for this feature.

Webpin provides a webbased solution, there is even a script for the command-line.

pkgfile

Available as pkgtools for pacman based systems. Provides a similar search feature like the others above:

$ pkgfile -si /usr/bin/mysqldump

Name      : mysql-clients
Version   : 5.1.54-1
Url       : http://www.mysql.com/
License   : GPL
Depends   : libmysqlclient
...

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.

apt-file search <path-to-file>

For example, let's search for the not installed binary mysqldump:

$ apt-file search /usr/bin/mysqldump

mysql-client-5.1: /usr/bin/mysqldump
mysql-client-5.1: /usr/bin/mysqldumpslow
mysql-cluster-client-5.1: /usr/bin/mysqldump
mysql-cluster-client-5.1: /usr/bin/mysqldumpslow

It's also possible to list the contents of a (not-installed) package:

$ apt-file list mysql-client-5.1

mysql-client-5.1: /usr/bin/innochecksum
mysql-client-5.1: /usr/bin/innotop
mysql-client-5.1: /usr/bin/myisam_ftdump
mysql-client-5.1: /usr/bin/mysql_client_test
...

yum

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

yum whatprovides <path-to-file>

Again, the not installed mysqldump:

$ yum whatprovides /usr/bin/mysqldump

mysql-5.1.51-2.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

mysql-5.1.51-1.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

zypper

'szypper does include the command what-provides and concerning the manual, this should also search through the contents of not installed packages. Apparently, it does not work like intended. There is a request for this feature.

Webpin provides a webbased solution, there is even a script for the command-line.

pkgfile

Available as pkgtools for pacman based systems. Provides a similar search feature like the others above:

$ pkgfile -si /usr/bin/mysqldump

Name      : mysql-clients
Version   : 5.1.54-1
Url       : http://www.mysql.com/
License   : GPL
Depends   : libmysqlclient
...

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.

apt-file search <path-to-file>

You may want to update once before searching...

apt-file update 

For example, let's search for the not installed binary mysqldump:

$ apt-file search /usr/bin/mysqldump

mysql-client-5.1: /usr/bin/mysqldump
mysql-client-5.1: /usr/bin/mysqldumpslow
mysql-cluster-client-5.1: /usr/bin/mysqldump
mysql-cluster-client-5.1: /usr/bin/mysqldumpslow

It's also possible to list the contents of a (not-installed) package:

$ apt-file list mysql-client-5.1

mysql-client-5.1: /usr/bin/innochecksum
mysql-client-5.1: /usr/bin/innotop
mysql-client-5.1: /usr/bin/myisam_ftdump
mysql-client-5.1: /usr/bin/mysql_client_test
...

yum

yum accepts the command whatprovides (or provides) to search for installed or not installed binaries:

yum whatprovides <path-to-file>

Again, the not installed mysqldump:

$ yum whatprovides /usr/bin/mysqldump

mysql-5.1.51-2.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

mysql-5.1.51-1.fc14.i686 : MySQL client programs and shared libraries
Repo        : fedora
Matched from: 
Filename    : /usr/bin/mysqldump

zypper

'szypper does include the command what-provides and concerning the manual, this should also search through the contents of not installed packages. Apparently, it does not work like intended. There is a request for this feature.

Webpin provides a webbased solution, there is even a script for the command-line.

pkgfile

Available as pkgtools for pacman based systems. Provides a similar search feature like the others above:

$ pkgfile -si /usr/bin/mysqldump

Name      : mysql-clients
Version   : 5.1.54-1
Url       : http://www.mysql.com/
License   : GPL
Depends   : libmysqlclient
...
pkgfile
Source Link
wag
  • 37k
  • 13
  • 68
  • 51
Loading
added zypper
Source Link
wag
  • 37k
  • 13
  • 68
  • 51
Loading
added 578 characters in body
Source Link
wag
  • 37k
  • 13
  • 68
  • 51
Loading
Source Link
wag
  • 37k
  • 13
  • 68
  • 51
Loading