Programming in almost language

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

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

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>