Next 14.B: Screen Appearance Up 14: Customizing Prev 14: Customizing Contents Contents

Basic

§ 14.A: Alias for Commands


The alias command makes life nicer for you. And so we recommend it. Frequently-used commands, especially those requiring many options, can be shortened into a shorter command that does the same thing as the original.

There are two ways to use alias. The first is by just typing it at the prompt

Here real-command is the command the computer actually executes, and newname is the alias for it. For instance, you could make an alias called ll (for "long list") in place of ls -l.

To make an aliased command permanent, you would put it in your .cshrc file that can be found in your home directory(you might want to back it up juuuuuuust in case). Here are a few suggestions for commands you could put in there:

Did you know Unix was doing so much for you? (It's really so friendly.) Why not check the aliased commands in the man pages to see what they do.

If you don't like a particular alias you set up, you can type

to deactivate it in your current shell. If you find yourself doing that A LOT, maybe it is time to remove the alias from your .cshrc file (or to put the unalias command in there ;o) ).

The aliases you create are limited only by your creativity to think up names for them (and to remember these later on!). For example, if you find yourself telnetting weasel rather often, you could create a command telnetw to save yourself some typing:

Another use for aliased commands is to protect yourself from dangerous typos or irresponsible impulsive behavior. You may have noticed the following aliases in the list above.

In this "interactive" form (the -i) you are prompted before you overwrite or delete a file. If you do not have these aliases in your dotfiles, we recommend that you add them.

You are ready to go on to Customizing the Screen Appearance.


Next 14.B: Screen Appearance Up 14: Customizing Prev 14: Customizing Contents Contents

Comments and questions to request@cs.fiu.edu.