Add an alias


To add an alias to save some time on doing some tasks on the server simply use the below command.

List the current aliases

alias

Result

alias h='history'
alias jdep='cd /usr/local/jboss/server/default/deploy ; ls -l'
alias jlog='cd /usr/local/jboss/server/default/log ; ls -lrt'
alias jlogs='cd /usr/local/jboss/server/default/log ; ls -lrt'
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias lt='ls -lrt'
alias mess='tail -f /var/log/messages'
alias vi='vim'
alias vlm='cd /var/log/monitor'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

Add a new alias

alias home='cd /home/homedirname/'
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s