REHASH(1CSH) COMMAND REFERENCE REHASH(1CSH)
NAME
rehash, unhash, hashstat - hashing control and report
commands (csh built-in)
SYNOPSIS
rehash
unhash
hashstat
DESCRIPTION
In order to speed up execution path searching, csh(1csh)
hashes the commands in each of the directories in the
execution path. When executing a command, the command name
is hashed to see if it could possibly be in a given
directory. If the hash value of the command name indicates
that the command may be in a given directory, csh attempts
to execute that command. If the execution succeeds, the
operation is called a hit. If not, the operation is called a
miss.
The command rehash causes the internal hash table to be
recomputed. This is usually required when new commands are
added to directories in the execution path.
The command unhash disables execution path hashing. This is
useful when a lot of changes are being made to the
directories in the execution path.
The command hashstat prints a short report about the
efficiency of the hashing. The report is of the form:
number hits, number misses, number %. The hits and misses
numbers correspond to the number of hits and misses (as
explained above) since the shell was invoked. The
percentage given is the percentage of the total attempts
that succeeded in a hit.
EXAMPLES
In order to cause the internal command hash table to be
recomputed, execute the command:
rehash
RETURN VALUE
[NO_ERRS] Command completed without error.
CAVEATS
The more commands that exist in a given directory, the more
times the hashing result in a miss.
The hashing in csh is quite different from sh(1sh) hashing,
in that the latter stores information on a command when it
is executed and is more efficient when a directory contains
Printed 4/6/89 1
REHASH(1CSH) COMMAND REFERENCE REHASH(1CSH)
a lot of commands.
SEE ALSO
@(1csh), alias(1csh), bg(1csh), break(1csh), cd(1csh),
chdir(1csh), continue(1csh), csh(1csh), dirs(1csh),
echo(1csh), eval(1csh), exec(1csh), exit(1csh), fg(1csh),
glob(1csh), goto(1csh), hash(1sh), history(1csh),
jobs(1csh), kill(1csh), limit(1csh), logout(1csh),
nice(1csh), nohup(1csh), notify(1csh), onintr(1csh),
popd(1csh), pushd(1csh), repeat(1csh), set(1csh),
setenv(1csh), sh(1sh), shift(1csh), source(1csh),
stop(1csh), suspend(1csh), time(1csh), umask(1csh),
unalias(1csh), unlimit(1csh), unset(1csh), unsetenv(1csh),
wait(1csh), which(1csh), and execve(2).
Printed 4/6/89 2
%%index%%
na:360,164;
sy:524,328;
de:852,1769;
ex:2621,207;
rv:2828,177;
ca:3005,419;3856,25;
se:3881,1514;
%%index%%000000000131