Using alias tracking
Alias tracking can reduce the time that the shell spends searching your search path (specified
with the PATH variable) for a command; it helps shell scripts run faster. A tracked
alias is a shell-created alias that is the full path name for a command. The shell
automatically tracks everything that it finds in the default path for executables
(/bin). For example, if you enter the ps command, the shell
creates the alias:
ps="/bin/ps"To use alias tracking for commands in other locations, enter the command:
set -o trackallThe first time you enter a command, the shell creates an alias
that is the full path name of the command. For example, if the user marcw
entered the hello command and the shell tracked the command, it would
create the alias: hello="/u/marcw/bin"Each time you enter a command, the
shell uses its tracked alias, instead of searching the PATH for the command.To list your tracked aliases, enter the command:
alias -tTo turn off alias tracking of all commands, enter the command:
set +o trackallThen commands found in directories other than
/bin are not tracked. When the PATH search finds a command in
/bin, the path name will always be tracked.To remove tracked aliases, use:
alias -r