Programming in almost language

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

  • Categories

  • LinkedIn

  • Tweet Me

  • My footsteps

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

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

 
%d bloggers like this: