Command aliases are also available in C
shell (they are not available in the Bourne shell). An alias is a way
to give a command a different name for use in the shell. Aliases
provide an excellent way to improve efficiency when using shell
commands. When set from the command line, aliases are only activated
for the shell in which they are created. Add aliases to your .cshrc
file to activate them upon login or whenever a new window or shell is
opened. The function of an alias within the C Shell is the same as
that of the Korn shell. Figure
reviews the reasons to use aliases. The commands used are identical
except that the C shell does not require an equal sign (=) between the
command and the name of the alias. Figure
shows some examples of the
alias
command and an example of the
unalias
command
Creating Aliases - The command
format used to create aliases is very similar to the Korn shell except
that it is not necessary to use the equal sign.
| Command Format: |
|
alias aliasname value |
Removing Aliases: Use the unalias
command when you want to remove an alias.
| Command Format: |
| unalias
alias_name |
|