{{Short description|Standard UNIX utility}} {{refimprove|date=December 2009}} {{Lowercase title}} {{Infobox software | name = hash | logo = | screenshot = | screenshot size = | caption = | author = | developer = Various open-source and commercial developers | released = | latest release version = | latest release date = | operating system = Unix, Unix-like, IBM i | genre = Command | license = | website = }}
'''hash''' is a command on Unix and Unix-like operating systems that prints the location information for the commands found. The {{kbd|hash}} command has also been ported to the IBM i operating system.<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |author=IBM |website=IBM |author-link=IBM |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 }}</ref>
==Syntax== $ hash [name]
==Description== 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.
==Options== The following options are supported. ;name: Searches the PATH environmental variable for the name given
==Exit Status== This command returns the following exit values:
;0: Successful completion
;1: An Error occurred
==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 also== * find * Unix shell {{unordered list| sh | bash | csh | | ksh }}
==References== {{Reflist}}
==External links== {{Wikibooks|Guide to Unix|Commands}} * {{man|cu|hash}} * {{man|1|hash|Solaris}}
{{Unix commands}}
Category:Unix SUS2008 utilities Category:IBM i Qshell commands