How to avoid long commands and mistypes?

by Sanju 2009-03-10 12:45:04


The alias command is useful for setting up shortcuts for long commands, or even more clever things.

alias lsnew=" ls -al --time-style=+%D | grep `date +%D` "


But there are other uses of alias. For example, common mistyping mistakes. How many times have you accidentally left out the space when changing to the parent directory?

alias cd..="cd .."


Alternatively, how about rewriting some existing commands?

alias ls="ls -al"


To have these shortcuts enabled for every session, just add the alias commands to your user .bashrc file in your home directory.


Tagged in:

1275
like
0
dislike
0
mail
flag

You must LOGIN to add comments