Which does not show the actual execution location of the executable

I have an SVN version on my system in / usr / bin / svn. This is too old to use with some repositories, so I compiled a newer version in / home / user / built / bin / svn that works fine. I added this to my PATH so that it starts first.

Enter

which svn

produces

/home/user/built/bin/svn

however typing

svn --version

shows that he is still using the old version. if i run

/home/user/built/bin/svn --version

then the correct version is displayed.

Since the user version is the first in my $ PATH variable and which first lists it, why is the older version called when svn starts? I thought I used your $ PATH to search for executables just like the shell?

[Change] Type gives:

type svn
svn is hashed (/usr/bin/svn)

Using

hash -r

Now fixed the problem! Thanks for the help.:)

+3
2

type svn

(), , () . , PATH , ,

echo $PATH
+3

, svn - ?

0

Source: https://habr.com/ru/post/1783671/


All Articles