Linux hash, hashstat, and unhash commands

Updated: 08/02/2019 by Computer Hope
hash command

On SunOS, the hash, hashstat, and unhash commands access the hash table. If the table is unhashed, the C shell stops using hashed values and will spend time searching the path directories to locate a command.

Tip

For information about the hash command in bash see our bash hash command page.

Syntax

hash [-r] [name]
unhash
hashstat
-r Removes all current tracked aliases.
name Location of hash.

Examples

unhash

Remove internal hash table.

hashshat

Display the hash statistics. Output resembles the following:

66 hits, 33 misses, 66%

csh — The C shell command interpreter.
ksh — The Korn shell command interpreter.
rehash — Recompute internal hash tables under Solaris.
sh — The Bourne shell command interpreter.