Programming in almost language

Thi s is the site where you may share your knowledge and experience to eachother..

Archive for August, 2009

Creating an alias as a non root user .

Posted by Pratap on August 3, 2009

Hi folks!!!

Many of you have faced the same problem for creating an alias of the frequently used command .

But here is another way to do it . It is not just to add alias using alias command which will enable the particular alias for particular session and console . I am not going to use alias command to create aliases .

I would suggest you (if you do not have root access ) to write a script which will help you to use it like an alias .

For example suppose you want to create the alias for telnet command , for root user it is easy to create , by adding a single line to .bashrc file but for a non-root user this is very handy .
-===========

vi t ### create a filename with t name

####add the following line to this file

telnet $1 $2

###save and quit :wq

chmod 777 t

now use the following command

./t yourdomain.com 25

#### voila it is working

Now it depends on you to choose it or reject it .
In the same way you can create many script for your aliases.

kdarious@gmail.com

Posted in Learning Linux | Tagged: | Leave a Comment »