Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Linux Tip 'O the Day
Message
 
À
Tous
Information générale
Forum:
Linux
Catégorie:
Autre
Titre:
Linux Tip 'O the Day
Divers
Thread ID:
00436539
Message ID:
00436539
Vues:
47
Bash aliases.

So you do some of the same commands all the time.

ls -F --color

ls -al

cd /usr/local/apache/htdocs/html-www

Why waste time typing them in all of the time?

Enter .bashrc.

Inside your .bashrc you can use the "alias" command.

alias ls="ls -F --color=auto"
alias goweb="cd /usr/local/apache/htdocs/html-www"
alias ftp=ncftp
alias dumbterm="export TERM=vt100; telnet dumbhost.domain.tld"

You can alias just about anything. Even commands that already exist! (see the ls example) Remember that you can separate multiple commands with a ';'. (see the dumbterm example)
Remember that the .bashrc only gets read on login. So say:
. .bashrc
To read changes in the file.

Or just logoff and back on.

j
Jason Bradley Nance
jbnance@tresgeek.net

Got root?
Répondre
Fil
Voir

Click here to load this message in the networking platform