as the shorthand name, or alias, for
is omitted, print the alias for
is also omitted, print all aliases. Aliases can be defined
on the command line, but they are more often stored in
they take effect upon logging in. (See the sample
earlier in this section.)
Alias definitions can reference command-line arguments, much like
the history list. Use
to refer to all command-line arguments,
for the first argument,
for the last, etc. An alias
can be any valid UNIX command; however, you lose the original
command's meaning unless you type \
. See also
Set the size for xterm windows under the X Window System:
alias R 'set noglob; eval `resize`; unset noglob'
Show aliases that contain the string
alias | grep ls
Run nroff on all command-line arguments:
alias ms 'nroff -ms \!*'
Copy the file that is named as the first argument:
alias back 'cp \!^ \!^.old'
Use the regular
, not its alias: