Tuesday, October 25, 2011

UNIX Command Aliases

With alias, you can define new commands that does whatever you like to do with unix in a customized way.

Format for using aliases in
csh:- alias word command-sequence
ksh:- alias word='command'

Example:
bash-3.00$ alias shiyas='ls -CF'

If you want to see the list of aliases created, you only need to enter the word alias

Example:
bash-3.00$ alias
alias ls='ls -CF'
alias shiyas='ls -CF'

Note:
There should not be any space befor or after '=' sign.

If you want to make availability of an alias permanent add it into .chrsc if you are using csh or to .profile if you are using korn shell

No comments:

Post a Comment