My old xournal is 0.4.5, which is /usr/bin/xournal
. I just installed a new version 0.4.8 by compiling from source to /usr/local/bin/xournal
.
When I call xournal
directly from the terminal, it is the old version.
$ xournal
When I call /usr/local/bin/xournal
, it is the new version.
$ /usr/local/bin/xournal
But
which
shows thatxournal
is/usr/local/bin/xournal
$ which xournal /usr/local/bin/xournal
Isn't
which
supposed to show the actual path when callingxournal
?My
PATH
puts/usr/local/bin
before/usr/bin
, so why doesn't callingxournal
call/usr/local/bin/xournal
but/usr/bin/xournal
?$ echo $PATH ”/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”
Thanks.
which
also search in some database or hashed results? – Tim Jul 22 '14 at 00:19which
is a builtin that uses the shell's hash table. The rest of the time it always searches$PATH
. – Michael Homer Jul 22 '14 at 00:31hash
.type x
will tell you whetherx
is currently hashed or not. – Michael Homer Jul 22 '14 at 00:47