1753506 Members
5971 Online
108794 Solutions
New Discussion юеВ

Re: modifying link

 
SOLVED
Go to solution
HPOPSW
Advisor

modifying link

Currently there is a link on the server which goes to /sap/AT. How can we change this to go to /sap/BT?
16 REPLIES 16
James R. Ferguson
Acclaimed Contributor

Re: modifying link

Hi:

Remove (rm) the link and recreate it where you want it to point.

Regards!

...JRF...
HPOPSW
Advisor

Re: modifying link

Hi James,

Thanks for the response. Since I am new to this, can you please let me know from where to remove the link and how to change it to other destination?
Mel Burslan
Honored Contributor
Solution

Re: modifying link

cd /where/the/link/is
rm sym_link
ln /sap/BT sym_link

where you need to replace the word sym_link with the actual name of the link you have

Hope this helps
________________________________
UNIX because I majored in cryptology...
James R. Ferguson
Acclaimed Contributor

Re: modifying link

Hi:

Consider this:

# touch /tmp/myfile # create a file for play
# ln -s /tmp/myfile /tmp/mylink # point to it
# ls -l /tmp/mylink
# rm /tmp/mylink
# ln -s /tmp/myfile /tmp/yourlink # point with a different link
# ls -l /tmp/yourlink

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: modifying link

Hi (again):

Be sure the read the manpages for 'ln'. I have assumed in my examples that you had and want to create symbolic (soft) links. Hence the use of the '-s' switch.

Regards!

...JRF...
HPOPSW
Advisor

Re: modifying link

Thanks James and Mel,

Please consider the below scenario and advice -

there is a link created for /oracle/KPC:
lrwxr-xr-x 1 orakhr dba 3 Dec 17 15:00 KPC -> KHR

This link currenlty goes to /oracle/KHR
How can I change it to go to /oracle/KTC ?Also how can I change the owner of the link that to oraktc.
Avinash20
Honored Contributor

Re: modifying link

# cd /oracle
# rm KPC
# ln -s KTC KHR
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: modifying link

Also how can I change the owner of the link that to oraktc.

# chown orakhr /oracle/KTC


"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: modifying link

Also Please assign points to your thread
http://forums11.itrc.hp.com/service/forums/helptips.do?#33

This is a way of saying thanks to the right answers
"Light travels faster than sound. That's why some people appear bright until you hear them speak."