Create the following directories:
Navigate to child and create a file named
child (this is an executable file in my case, not sure if that makes a difference).
I need to create two "link to executable" links in the parent. I had assumed that this would work:
ln -sf ./child ../child1 ln -sf ./child ../child2
But that creates a "link to folder" (./child) in the parent directory.
If I change it to:
ln -sf -t.. ./child child1 ln -sf -t.. ./child child2
I get an error, "ln: '../child': cannot overwrite directory".
If I do it from the parent directory (which I cannot do, this is part of a Makefile recipe):
ln -sf ./child/child ./child1 ln -sf ./child/child ./child2
Note that I cannot alter the names of any directories or files.
How do I create the links when the current directory is the child?