[Debian/Linux應用]查找命令所屬的軟件包

轉載自:http://weimenlove.blog.163.com/blog/static/17775473201243104550894/ php


   學習Linux過程當中,在網上或書上會看到一些命令,可是使用的系統並無這些命令,須要安裝相應的軟件包,能夠使用apt-file來對命令進行查詢,來找出其所屬的軟件包。
html

$ sudo aptitude install apt-file緩存

$ sudo apt-file update    <---更新索引,查詢以前必作ide

好比要查詢mkdosfs所屬的軟件包學習

$ apt-file search mkdosfs | egrepmkdosfs$    <---查找以mkdosfs結尾的文件,縮小搜索範圍網站

dosfstools: /sbin/mkdosfsspa

$ sudo aptitude install dosfstools.net

$ sudo apt-file purge   <----清除緩存文件unix

$ apt-file list dosfstools      <---列出軟件包的內容htm

該命令與dpkg -S的做用類似,不一樣的是dpkg -S只能查詢系統已經安裝過的,apt-file能夠在軟件源中進行查詢。

或者直接經過網站:,能夠經過:http://www.debian.org/distrib/packages查詢。

  RedHat系統中相似的命令是:

$ sudo yum provides mkdosfs

$ yum list mkdosfs


Reference:

http://www.debuntu.org/how-to-find-missing-packages-with-apt-file    <---apt-file使用

http://bbs.chinaunix.net/thread-565919-1-1.html    <---字符串匹配

http://forums.fedoraforum.org/showthread.php?t=220912    <---yum provides

相關文章
相關標籤/搜索