LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Make symbolic link or alias (https://www.linuxquestions.org/questions/linux-newbie-8/make-symbolic-link-or-alias-220090/)

gubak 08-20-2004 06:51 AM

Make symbolic link or alias
 
How can I make a symbolic links or aliases which are point to another location?

ppuru 08-20-2004 06:55 AM

ln -s for symbolic link

you can use the alias command to create aliases

e.g.
alias cp="cp -v "

guzzi 08-20-2004 09:39 AM

symlink
 
This may be of some help.

Lets say you are in your home directory and want to create a file which is really somewhere else. Lets use /etc/inittab as a test.

ln -s give_it_a_name_file /etc/inittab

This will make a file named give_it_a_name_file in your home directory that is really a link to /etc/inittab

Good Luck

barisdemiray 08-20-2004 09:54 AM

Re: symlink
 
Quote:

Originally posted by guzzi
This may be of some help.

Lets say you are in your home directory and want to create a file which is really somewhere else. Lets use /etc/inittab as a test.

ln -s give_it_a_name_file /etc/inittab

This will make a file named give_it_a_name_file in your home directory that is really a link to /etc/inittab

Good Luck

No, this will make an error :-)

Code:

[baris@rhinox]$ ln --help
Usage: ln [OPTION]... TARGET [LINK_NAME]
...

correct form is

Code:

ln -s /etc/inittab give_it_a_name_file

guzzi 08-20-2004 10:10 AM

you are right and I am ?
 
what I should have shown is

ln -s /etc/inittab give_it_a_name

next time I will engage brain before posting.

Thanks for getting me organized.

FarAway 08-20-2004 12:50 PM

if you wanna make an alias permanently, you can add a line (eg. alias cp="cp -i") into the file ~/.bashrc

hope that helps. ^_^


All times are GMT -5. The time now is 08:46 PM.