2016-06-10 73 views
1

which命令似乎並沒有被給予正確的結果:路徑不是真的給定的路徑到Python

[[email protected] ~]$ unalias python 
bash: unalias: python: not found 
[[email protected] ~]$ unalias which 
bash: unalias: which: not found 
[[email protected] ~]$ which python 
/usr/local/bin/python 
[[email protected] ~]$ /usr/local/bin/python -V 
Python 2.7.6 
[[email protected] ~]$ python -V 
Python 2.6.6 
[[email protected] ~]$ ls -l /usr/local/bin/python* 
lrwxrwxrwx. 1 root root 11 Jun 10 12:27 /usr/local/bin/python -> python2.7.6 
-rwxr-xr-x. 1 root root 8040 Jun 10 12:21 /usr/local/bin/python2.7 
-rwxr-xr-x. 1 root root 8040 Jun 10 12:25 /usr/local/bin/python2.7.6 
-rwxr-xr-x. 1 root root 1674 Jun 10 12:23 /usr/local/bin/python2.7-config 
lrwxrwxrwx. 1 root root 16 Jun 10 12:23 /usr/local/bin/python2-config -> python2.7-config 
lrwxrwxrwx. 1 root root 14 Jun 10 12:23 /usr/local/bin/python-config -> python2-config 
[[email protected] ~]$ 
+0

雖然不是這裏的問題,[這裏](http://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then)是一些良好的閱讀關於爲什麼不用'哪個'搭配'bash' –

+0

我把那一整天放在一邊,我可以專注於它。看起來很有趣! –

回答

3

沒有,which是罰款。 bash很困惑。

hash -d python 
+0

謝謝! -d做了什麼? –

+0

確切地說''幫助哈希'說它做。 –

+0

有幫助嗎? 他們什麼時候發明的?男子散列毫無價值。 –