# Aliases

You can give any combination of commands a name, called alias, and then use that name instead, to save time and avoid making typos. This is useful for anything you do frequently. An example may be
alias psp 'psnup -2r \!* | lpr -h -Pvalkyr'
which prints ps-files aligning two pages next to each other on one piece of paper.

Just put these aliases at the end of your .cshrc file, and then type source .cshrc to let the shell know about them. You'll have do this only once - the next time you log in the .cshrc file will be read in automatically anyway.

You can also use aliases to specify which options of common commands you want to use. For example, if you want to be asked every time before any file gets deleted, you can define

alias rm 'rm -i'
By giving this alias the same name as the original command you in effect override it, so be careful not to use the names of existing commands for unrelated aliases. Also, while your aliases always have priority, they do override each other, so be sure you don't have an alias with the same name already later in the file.

If you want to use the original, unaliased version of your command, for example to remove a lot of files in one directory without having to type y a hundred times (as can happen e.g. in the .netscape/cache directory), use the command preceded by \ i.e. for example \rm