0

I want to create a symbolic link which will not break even after copying the entire directory( which includes the link and its target) in a pendrive/sd-card and using the pendrive/sd-card in other system.

For ex:

 S70pppd-dns -> ../init.d/pppd-dns  
 S77hello_init -> /home/silviya/package/rootfs/etc/init.d/hello_init  

Here, the link for hello_init is created by me, other one is there by default. How can I create the symbolic link as shown below ??
S70hello_init -> ../init.d/hello_init

NOTE:
I created the link using the command:

ln -s 'target_file' 'symbolic_link'
SILVIYA
  • 31
  • 4
  • I don't think that would be possible because the path would change from computer to computer – Jay T. Feb 25 '16 at 13:52
  • Its possible by symlink command.. But I don't know how to use it – SILVIYA Feb 25 '16 at 13:57
  • look here: http://serverfault.com/questions/389997/how-to-override-update-a-symlink and http://blog.endpoint.com/2009/09/using-ln-sf-to-replace-symlink-to.html – Jay T. Feb 25 '16 at 14:02
  • Maybe I don't understand your real problem. Is anything wrong with ln -s ../init.d/hello_init S70hello_init? It creates the slink right away. – user556625 Feb 25 '16 at 14:03
  • Good news !! I have done it ... Refer to this link : https://superuser.com/questions/753001/make-a-symlink-in-bash-with-two-relative-paths – SILVIYA Feb 26 '16 at 05:37

0 Answers0