NOTE: what is said below is correct for the csh and tcsh shells. For others some of the details and files could be different.
rm *.dvi *.aux *.log
alias clean 'rm *.dvi *.aux *.log'
respectively, for the bash shell
alias clean='rm *.dvi *.aux *.log'
Next time we can type clean to invoke the same command.
alias clean
unalias clean
alias
There are two inconveniences with this approach:
This file is read once at the start of each shell.
Hence, changes made after the shell is running are ignored. However, you
can source
the corresponding file to have the changes take
effect.
WARNING: These files contain important information for the shell. Be sure you do not alter that part!
This is a sample ~/.cshrc (or ~/.tcshrc), containing the
alias clean as well.
The file has to end with a RETURN character.
Comment lines begin with #.
(The meaning of -i in these commands is to ask for confirmation before deleting or overwriting a file.).... some other stuff # Aliases alias cp 'cp -i' alias rm 'rm -i' alias mv 'mv -i' alias clean 'rm -i *.dvi *.log *.aux *.toc'
A few technical details:
alias lm 'ls -l \!* | more
alias cd 'cd \!* ; dirs'