我已经知道了apt-cache
一段时间了,但是直到昨天才偶然发现apt-file
。
我的问题是,鉴于两者的这种输出...
ttsiod@avalon ~
$ apt-cache search setxkb
x11-xkb-utils - X11 XKB utilities
xfce4-xkb-plugin - xkb layout switch plugin for the Xfce4 panel
ttsiod@avalon ~
$ apt-file find setxkb
fish: /usr/share/fish/completions/setxkbmap.fish
fish: /usr/share/fish/functions/__fish_complete_setxkbmap.fish
x11-xkb-utils: /usr/bin/setxkbmap
x11-xkb-utils: /usr/share/man/man1/setxkbmap.1.gz
xmanpages-ja: /usr/share/man/ja/man1/setxkbmap.1.gz
zsh: /usr/share/zsh/functions/Completion/X/_setxkbmap
zsh-beta: /usr/share/zsh-beta/functions/Completion/X/_setxkbmap
zsh-common: /usr/share/zsh/functions/Completion/X/_setxkbmap
...为什么要打扰apt-cache?apt-file并非在各个方面都优越吗?
我可能错过了一些东西。
编辑:我问的原因是因为apt文件比apt缓存报告了更多的软件包。我仅将apt-cache用于用例“我需要工具/手册/任何名为foo的软件包-哪些软件包包含foo?” 似乎apt-file似乎可以完成apt-cache的所有工作,但是更好-它报告了更多的程序包(apt-cache缺少了一些),并且还显示了所涉及的文件名。
apt-cache
查询可用软件包及其元数据(安装源,版本,依赖项,描述等)的数据库。
apt-file
查询可用软件包及其包含的文件的数据库。
这些数据库之间唯一的共同信息是它们都列出了可用的软件包名称。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句