February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Remembers or reports utility locations.
Syntax
hash [utility]
Options
-r forgets remembered locations.
Oddities
The hash command is an alias for alias -t. It sets up tracked aliases. (Not heavily used because processor speeds and caching strategies eliminate the penalty of multiple PATH lookups.)
Example
$ hash # Nothing remembered yet $ $ hash ls # Remember the location of ls $ $ hash # In the list now ls=/bin/ls $ $ hash cat # Location of cat will be remembered also $ $ hash # Both in the hash list cat=/bin/cat ls=/bin/ls $ $ hash –r # Refresh the list $ $ hash # Names are known, locations aren't cat ls $
Read now
Unlock full access