CLI = Command Line Interface
Aliases are short strings that can be used in lieu
of longer commands and short scripts that you
alias ls='ls -shF'
alias g='mozilla http://google.com'
An alias takes precedence over an executable's file name,
as in "ls" above.
To bypass an alias, use the full path:
To find the full path of any executable, do:
$ type -a ls # for example
The first thing to do when looking for a good alias
is to check and see whether that string has been taken
for a script, binary executable, function, etc.:
$ type g
type: g: not found
$ type mc
mc is /usr/bin/mc
Create an alias file (making sure there is no other
file with that path/name using ls). "~/.bash-aliases"
would be a good name. List your aliases there, one
If you want to put anything else in your alias file
besides blank lines, be sure to comment them out:
# ~/.bash-aliases - sourced in ~/.bashrc
Then put this line in your ~/.bashrc:
and have bash re-read its rcfile:
You should do this whenever you edit your alias file.
A handy alias is:
alias S='source ~/.bashrc'
alanconnor AT earthlink DOT net
Use your real return address or I'll never know you
even tried to mail me. http://tinyurl.com/2t5kp
||6/13/2005 12:14:01 AM