On Wed, Jan 05, 2000 at 05:54:15PM -0800, Rob Hudson wrote: > > For instance, I just upgraded my vim 5.3 to vim 5.5. The 5.3 > version was the one that came with redhat, the 5.5 was the upgraded > version that I compiled from the source. The RPM had the binary in > /usr/bin, where as the new version from the source put the binary in > /usr/local/bin. When I type vim at the command prompt, it returns: > bash: /usr/bin/vim: No such file or directory. But I can type the > absolute path, and get it running. Where and how does it 'remember' > where it was? Should it search all the paths in my PATH environment > variable for the binary? /usr/local/bin is the 1st on listed, > whereas /usr/bin is the 3rd. > To save time starting programs, bash (I assume you are using bash) keeps a cache of file locations in a so-called "hash" table (don't ask!). So once a program is used, bash will keep on looking for it where it first found it. The cache can be cleared using the "hash -r" command or setting PATH. -- R.
