Hash (Unix)
hash is a command on Unix and Unix-like operating systems that prints the location information for the commands found. The hash command has also been ported to the IBM i operating system.[1] Syntax$ hash [name] DescriptionWhen 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. OptionsThe following options are supported.
Exit StatusThis command returns the following exit values:
Examples$ hash 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. See alsoReferences
External linksThe Wikibook Guide to Unix has a page on the topic of: Commands
|