Almost all modern shell remembers program location and cache the result to speed up operation. Shell has something called hash table which is nothing but the contents of the directories in the path ($PATH) variable to be recomputed. To flush cache simply type the following under bash:
# hash -r
If you are using CSH, type:
# rehash
This is needed if new commands are added to directories in path while you are logged in. This should be necessary only if you add commands to one of your own directories, or if a systems programmer changes the contents of one of the system directories. Also flushes the cache of home directories built by tilde expansion.
No comments:
Post a Comment