Command Format: alias [-tx] [name=value]
-t = to set and list tracked aliases
-x = to set or display exported aliases
name = if specified, it must be a valid alias name
value = value to equate with name
Example:
$alias
The command alone will display all aliases.
Sample Session:
$alias
cd=c
echo=print -
false=let 0
functions=typeset -f
hash=alias -t
history=fc -l
integer=typeset -i
monitor=/usr/lbin/top
nohup=nohup
pwd=print - $PWD
r=fc -e -
true=:
type=whence -v
$
Suppose, instead of typing in the ls -la command to get a full,
long listing of the contents of the current directory, we want to
shorten the command to list. Enter the following command to set
the alias.
Example:
$alias list='ls -la'
Now when you type in the command list, the alias will substitute
the command ls -la for list; and the long listing will be
displayed.
Sample Session:
$list
total 54 0
drwx------ 4 teacher class 2590 May 1 09:39 .
drwxr-xr-x 63 teacher class 1536 Sep 9 13:11 ..
-rw-r--r-- 1 teacher class 64 Jul 4 10:33 .assistrc
.
.
Go to the top,
first,previous,next,
last section, table of contents.