1834770 Members
2992 Online
110070 Solutions
New Discussion

symbolic link

 
SOLVED
Go to solution
panchpan
Regular Advisor

symbolic link

Hello.
Can you please let me know the command for creating s links?
I want to create a link for my application say link1 and whenever any of the script uses link1 it must go to /home/app/link2.sh file

Thanks
9 REPLIES 9
Coolmar
Esteemed Contributor

Re: symbolic link

# ln -s link1 /home/app/link2.sh
Yarek
Regular Advisor

Re: symbolic link

ln -s /home/app/link2.sh link1
James R. Ferguson
Acclaimed Contributor

Re: symbolic link

Hi:

# man ln

Regards!

...JRF...
Yarek
Regular Advisor

Re: symbolic link

comment:

ln -s /home/app/link2.sh link1

above command links /home/app/link2.sh to new or existing 'link1' file
panchpan
Regular Advisor

Re: symbolic link

Thank you !

Also, can you tell me the command to replace #!/bin/ksh by #!/usr/bin/ksh in many of my shell scripts?

THANKS!
panchpan
Regular Advisor

Re: symbolic link

Hello.
I tried to create link - it gave error saying ln : exist. but did not create the link.

THANKS
Devender Khatana
Honored Contributor
Solution

Re: symbolic link

Hi,

It will give this error if there is some file or directory with name link1 in you current directory.

HTH,
Devender
Impossible itself mentions "I m possible"
James R. Ferguson
Acclaimed Contributor

Re: symbolic link

Hi:

> Can you tell me the command to replace #!/bin/ksh by #!/usr/bin/ksh in many of my shell scripts?

# perl -pi -e 's{^#!/bin/ksh\b}{#!/usr/bin/ksh}' file

...will replace, in-place. You can specify multiple filenames as arguments if you choose.

Regards!

...JRF...
panchpan
Regular Advisor

Re: symbolic link

THANKS!!!