Fedora17-command not found-命令延时
程序员文章站
2022-05-19 23:25:00
...
Fedora 17下不小心输入错误一条命令,提示command not found之后,往往还有几秒的延迟,这段时间系统干嘛去了呢?
在Fedora 17里,如果发现刚刚输入的这个命令没有,会自动在网上查找,所以导致command not found提示之后,还有几秒的latency。
这个机制是由“PackageKit-command-not-found-0.7.4-3.fc17.x86_64” 包提供的,找到它的配置文件就可以把这几秒远程查找的latency关闭掉:
vim /etc/PackageKit/CommandNotFound.conf
找到SoftwareSourceSearch=true
# Controls if the tool should search for packages in remote
# software sources. This may introduce a non-trivial delay if the sources
# have not been recently refreshed.
#
# Allowed values are 'true' or 'false'
#
# default=true
SoftwareSourceSearch=true
# software sources. This may introduce a non-trivial delay if the sources
# have not been recently refreshed.
#
# Allowed values are 'true' or 'false'
#
# default=true
SoftwareSourceSearch=true
设置为false,就可以关闭掉search功能。
另外,“SimilarNameSearch”这一条也可以考虑关掉:
# Controls if the tool should look for similar command names and suggest
# those instead.
#
# Allowed values are 'true' or 'false'
#
# default=true
SimilarNameSearch=true
# those instead.
#
# Allowed values are 'true' or 'false'
#
# default=true
SimilarNameSearch=true
它的功能如下,比如我输入‘sl’,它会提示你相似的命令是‘ls’:
[root@fedora conf]# sl
bash: sl: command not found...
Similar command is: 'ls'
bash: sl: command not found...
Similar command is: 'ls'
---EOF---
--nigelzeng
上一篇: 年轻男女的讽刺小幽默
下一篇: console for sinatra