This article needs additional citations for verification. (December 2009) (Learn how and when to remove this template message)
|Developer(s)||Various open-source and commercial developers|
|Operating system||Unix, Unix-like, IBM i|
$ hash [name]
When the user gives a command, the shell searches for the command in the path specified in the PATH environmental variable and stores the location in the hash. This command can be used to search for the command given. The command is built into the shell. C shell implements this command in a different way.
The following options are supported.
- Searches the PATH environmental variable for the name given
This command returns the following exit values:
- Successful completion
- An Error occurred
Print the hash table.
$ hash cat
Searches for command cat in the path specified by PATH environmental variable; if found, adds it to the hash.
|The Wikibook Guide to Unix has a page on the topic of: Commands|