When “which” command and the actual executable being executed do not match

Problem:

[root@clnt2 bin]# python -V
Python 2.6.6
[root@clnt2 bin]# which python
/usr/local/bin/python
[root@clnt2 bin]# /usr/local/bin/python -V
Python 2.7.3

[root@clnt2 local]# hash -r
[root@clnt2 local]# python -V
Python 2.7.3

http://unix.stackexchange.com/questions/47363/my-which-command-may-be-wrong-sometimes

 

CategoriesUncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *