hash [-dlrt] [-p
As the shell finds commands along the search path ($PATH), it remembers the found location in an internal hash table. The next time you enter a command, the shell uses the value stored in its hash table.
With no arguments, hash lists the current hashed commands. The display shows hits (the number of times the command is called by the shell) and the command name.
With commands, the shell adds those commands to the hash table.
Remove (delete) just the specified commands from the hash table.
Produce output in a format that can be reread to rebuild the hash table.
Associate file, assumed to be the full pathname, with command in the hash table rather than searching $PATH.
Remove all commands from the hash table.
With one name, print the full pathname of the command. With more than one name, print the command name and the full path, in two columns.
Besides the -r option, the hash table is also cleared when PATH is assigned. Use PATH=$PATH to clear the hash table without affecting your search path. This is most useful if you have installed a new version of a command in a directory that is earlier in $PATH than the current version of the command.