hash (Unix)
Appearance
hash is a Unix command that print the location information for the command executed.
Syntax
hash [-r] [name]
Description
The hash command in ksh gives the location information obtained by the shell by searching the PATH environmental variable
Options
The following options are supported
-r Print the hash table of the shell
name Print the location of the given name
Exit Status
This command returns the following exit values: 0 Successful completion >1 An error occurred.
Examples
1. hash Print the hash table. 2. hash -r Removes all the hash values 3. hash cat Prints the location information of the cat command.
File
/usr/bin/hash contains the hash command.
See also
The bash command, csh command, find command, ksh command, sh command.