Fedora17-command not found-命令延时

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

 

设置为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

 

它的功能如下,比如我输入‘sl’,它会提示你相似的命令是‘ls’:

 

[root@fedora conf]# sl
bash: sl: command not found...
Similar command is: 'ls'

 

---EOF---

--nigelzeng

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值