->Title Page
-->File Structure
-->Online Manual
-->Basic Commands
-->Additional Commands
-->Login files
-->Special characters
-->Miscellaneous Tips
-->Things to try
->Vi editor
->Mirror sites
->Further reading

[ Up ]

Unix ---> alias

The alias command allows you to define shortcuts to save yourself time. In a sense, alias creates a link between a requested set of keystrokes and another set of keystrokes. For example, to use the rm command in interactive mode I would type

    rm -i
By typing

    alias rm 'rm -i'
the alias command would allow me to avoid typing the interactive flag, -i, every time a called the rm command.

The alias command defines a link between the first and the second arguments following the command. Whenever the first argument is entered at the command prompt, the Unix shell substitutes it with the second argument. An alias link stays in effect until the Unix session is ended or the link is "unaliased". To remove the link in my previous example, I would type unalias x. The power of this command is more easily realized when used in a Login file.

Actually, alias is not a command. It is part of the particular shell I was familar with when I wrote this manual (csh). You can think of it as a command, but if doesn't work, you are probably using a different shell.

Site Statistics

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor