Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: nameChapter 4
The Bourne Shell and Korn Shell
Next: Reference: autoload
 

alias

alias [options] [name[='cmd']]

Korn shell only. Assign a shorthand name as a synonym for cmd. If ='cmd' is omitted, print the alias for name; if name is also omitted, print all aliases. See also unalias. The aliases below are built into the Korn shell. Some use names of existing Bourne shell or C shell commands (which points out the similarities among the shells).

autoload='typeset -fu'
echo='print -'
false='let 0'
function='typeset -f'
hash='alias -t'
history='fc -l'
integer='typeset -i'
nohup='nohup '
pwd='print -r - $PWD'
r='fc -e -'
true=':'
type='whence -v'

Options

-t

Create a tracked alias for a UNIX command name. The Korn shell remembers the full pathname of the command, allowing it to be found more quickly and to be issued from any directory. If no name is supplied, current tracked aliases are listed. Tracked aliases are the same as hashed commands in the Bourne shell.

-x

Export the alias; it can now be used in shell scripts and other subshells. If no name is supplied, current exported aliases are listed.

Example

alias dir='basename `pwd`'


Previous: Reference: nameUNIX in a Nutshell: System V EditionNext: Reference: autoload
Reference: nameBook IndexReference: autoload

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System