“which”命令总是显示正确的文件/哪个二进制文件正在运行?

我正在使用Ubuntu 12.04 LTS,而且我显然已经搞乱了我的系统与各种版本的重复安装:

  • 首先我从默认回购安装了0.6.18,
  • 然后我尝试使用PPA中的 0.6.23
  • 最后我从源码中build立了0.6.24并安装了它

(我列出这是完整的,但我不认为这是duplicity – 具体。)

现在我的系统的行为如下所示:

 root@host:~# duplicity -V duplicity 0.6.24 root@host:~# which -a duplicity /usr/bin/duplicity root@host:~# /usr/bin/duplicity -V duplicity 0.6.24 root@host:~# head /usr/bin/duplicity #!/usr/bin/python2.7 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # duplicity -- Encrypted bandwidth efficient backup # Version 0.6.23 released $reldate # # Copyright 2002 Ben Escoto <[email protected]> # Copyright 2007 Kenneth Loafman <[email protected]> # # This file is part of duplicity. 

???

在这里使用的Ubuntu中是否有一些二进制caching?

更新

 root@host:~$ cat /usr/bin/duplicity | grep 24 return 128 * 1024 if maxopen < 1024: log.FatalError(_("Max open files of %s is too low, should be >= 1024.\n" "Use 'ulimit -n 1024' or higher to correct.\n") % (maxopen,), root@host:~$ cat /usr/bin/duplicity | grep 23 # Version 0.6.23 released $reldate log.Log(u"duplicity 0.6.23 ($reldate)", verbosity) 

评论通常与代码不同步。 你可以grep -F '0.6.24' /usr/bin/duplicity来检查这个。 如果没有给出任何结果,则可能是版本string存储在多个variables中,因此您可能需要search2324

据我所知,没有发行版有一个可执行文件的caching。 我预计安全影响会很严重。