How to create a symbolic link or hard link to another symbolic link?

818 Views Asked by At

For example, I create a link ln -s /mytarget /mylink (where mytarget is a directory). Now I would like to create a link to /mylink, i.e., ln -s /mylink /mylinkother. The first link mylink works fine, but the second link mylinkother does not work.

Related:

  1. Does creating a symbolic link to another symbolic link have any side-effects?
  2. How to create a link to a directory
1

There are 1 best solutions below

1
Evandro Coan On

It actually works as I described on my first post. I was just pointing the symbolic link target, i.e., ln -s /linktarget linknameother to a non existing location. Once the /linktarget location was correct, my second link worked fine.