Fedora的yum软件包管理工具有一个不错的选项whatprovides,它使您可以找到安装了特定二进制文件或文件的软件包。Ubuntu上的等效命令是什么?
yum
whatprovides
例如,说我想找到提供的软件包/usr/bin/mysqladmin。我知道应该是这样的mysql-server*。我读过这apt-cache search blah是一个类似的命令,但是运行apt-cache search /usr/bin/mysqladmin不会返回任何内容。有更好的命令吗?
/usr/bin/mysqladmin
mysql-server*
apt-cache search blah
apt-cache search /usr/bin/mysqladmin
我相信apt-file会给您您想要的。
$ apt-file update $ apt-file list mysqladmin kmysqladmin: /usr/bin/kmysqladmin $ apt-file search mysqladmin autoconf-archive: /usr/share/aclocal/ac_prog_mysqladmin.m4 autoconf-archive: /usr/share/autoconf-archive/html/ac_prog_mysqladmin.html bash-completion: /etc/bash_completion.d/mysqladmin kmysqladmin: /usr/bin/kmysqladmin $ apt-file search mysqladmin mysql-admin: /usr/share/mysql-gui/administrator/mysqladmin_health.xml mysql-admin: /usr/share/mysql-gui/administrator/mysqladmin_startup_variables_description.dtd mysql-admin: /usr/share/mysql-gui/administrator/mysqladmin_startup_variables_description.xml mysql-admin: /usr/share/mysql-gui/administrator/mysqladmin_status_variables.xml mysql-admin: /usr/share/mysql-gui/administrator/mysqladmin_system_variables.xml mysql-client-5.1: /usr/bin/mysqladmin mysql-client-5.1: /usr/share/man/man1/mysqladmin.1.gz mysql-cluster-client-5.1: /usr/bin/mysqladmin mysql-cluster-client-5.1: /usr/share/man/man1/mysqladmin.1.gz mysql-testsuite: /usr/lib/mysql-testsuite/r/mysqladmin.result mysql-testsuite: /usr/lib/mysql-testsuite/t/mysqladmin.test