hash

create a tracked alias 

KornShell Built-in


SYNOPSIS

hash [name ...]

hash -r


DESCRIPTION

hash creates one or more tracked aliases. Each name on the command line becomes an alias that is resolved to its full path name; thus the KornShell avoids searching the PATH directories for the command whenever you invoke it. A tracked alias is assigned its full path name the first time that the alias is used. It is re-assigned a path name the first time that it is used after the variable PATH is changed or the shell command cd is used.

hash is a built-in alias defined with

alias hash='alias -t'

If you specify hash without any arguments on the command line, hash displays the current list of tracked aliases.

Options

-r 

removes all current tracked aliases.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure because of an invalid command line option.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


NOTE

This is an alias built into the MKS KornShell.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Windchill Requirements and Validation


SEE ALSO

Commands:
alias, sh


PTC MKS Toolkit 10.4 Documentation Build 39.