Bash.Builtin.Hash (Bash v0.6.0)

Copy Markdown View Source

hash [-lr] [-p pathname] [-dt] [name ...]

Remember or display program locations.

For each NAME, the full pathname of the command is determined and remembered. If the -p option is supplied, PATHNAME is used as the full pathname of NAME, and no path search is done. The -r option causes the shell to forget all remembered locations. The -d option causes the shell to forget the remembered location of each NAME. If the -t option is supplied the full pathname to which each NAME corresponds is printed. If multiple NAME arguments are supplied with -t, the NAME is printed before the hashed full pathname. The -l option causes output to be displayed in a format that may be reused as input. If no arguments are given, information about remembered commands is displayed.

Reference: https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-hash