HASH(1SH) COMMAND REFERENCE HASH(1SH)
NAME
hash - execution path hashing (sh built-in)
SYNOPSIS
hash [ -r ] [ name . . . ]
DESCRIPTION
For each name, the location in the execution search path of
the command specified by name is determined and remembered
by the shell. This speeds up execution of commands greatly.
The -r option causes the shell to forget about all known
locations.
If no arguments are given, information about each command
that is remembered is printed. The column labelled hits is
the number of times that each listed command has been
invoked by the current shell. The column labelled cost is a
measure of the work required to locate the command in the
search path.
In certain situations, the stored location of a command must
be recalculated. Commands for which this will be done are
indicated by an asterisk adjacent to the hits information.
The cost information is incremented when the recalculation
is done.
OPTIONS
-r Removes all remembered commands from the hash list.
EXAMPLES
Executing the command
hash ls
will cause the path of the command ls to be stored for
faster execution.
RETURN VALUE
[NO_ERRS] Command completed without error.
[NO_CMD] Shell could not find the command.
SEE ALSO
break(1sh), cd(1sh), chdir(1sh), continue(1sh), csh(1csh),
echo(1sh), eval(1sh), exec(1sh), exit(1sh), export(1sh),
hashstat(1csh), login(1), pwd(1sh), read(1sh),
readonly(1sh), rehash(1csh), return(1sh), set(1sh), sh(1sh),
shift(1sh), test(1sh), times(1sh), trap(1sh), type(1sh),
Printed 10/17/86 1
HASH(1SH) COMMAND REFERENCE HASH(1SH)
ulimit(1sh), umask(1sh), unhash(1csh), unset(1sh),
wait(1sh), which(1sh), execve(2).
Printed 10/17/86 2
%%index%%
na:72,83;
sy:155,135;
de:290,1021;
op:1311,124;
ex:1435,195;
rv:1630,188;
se:1818,727;2689,259;
%%index%%000000000129