2005年5月17日

Debian: Find programs? 寻找程序包?

Since I'm talking about Debian tricks, here is one more trick on dealing with debian packages:

Looking for program:


Sometime, people tell you to use a command to solve your problem, but you don't have this command on your system, what you do you?


You can install apt-file and run:


user$ apt-file update
user$ apt-file search command_name

"update" will download/update package lists from the apt servers. "search" will search a filename from all the packages on the apt servers, even for the files that you did not installed on your system.



想知道一个命令或者一个文件在哪个程序包里吗?比如别人让你跑一个程序,但是你发现你的系统里没有这个程序,怎么办?你可以安装 apt-file这个程序,然后跑下面的命令:


user$ apt-file update
user$ apt-file search command_name


"update" 让 apt-file 从网上下载和更新所有程序包的内容,"search"让它在程序包里搜索一个文件名,这个文件名所在的程序包有没有安装无所谓。当然这个功能其他的几个 deb/apt 应用程序也可能有,不过我几年前开始用这个,用着顺手,就没有发掘新的程序了。



当然,如果你装了 synaptic ,可能什么窍门都不用了,它全包了。

没有评论: