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
whichshows thatxournalis/usr/local/bin/xournal$ which xournal /usr/local/bin/xournalIsn't
whichsupposed to show the actual path when callingxournal?My
PATHputs/usr/local/binbefore/usr/bin, so why doesn't callingxournalcall/usr/local/bin/xournalbut/usr/bin/xournal?$ echo $PATH ”/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”
Thanks.
whichalso search in some database or hashed results? – Tim Jul 22 '14 at 00:19whichis 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 xwill tell you whetherxis currently hashed or not. – Michael Homer Jul 22 '14 at 00:47