I solved it by placing myself in yet-another-folder
and doing;
ln -s ../../../source-folder/source target
So I'm placed in the target's parent folder and the specified source path is relative to where I'm placed.
Question
I'm trying to create a folder that is going to contain all files that are in another folder.
This is the tree structure. I want to symlink source
to target
.
.
├── source-folder
└── source <-- source folder
└── controllers
└── another-folder
└── yet-another-folder
└── target <-- target folder
I tried
ln -s source-folder/source controllers/another-folder/yet-another-folder/target
but it only creates an empty alias file.
How do I create a folder that contains the same data that is in the source-folder/source
folder?
Solution 2
I solved it by placing myself in yet-another-folder
and doing;
ln -s ../../../source-folder/source target
So I'm placed in the target's parent folder and the specified source path is relative to where I'm placed.
OTHER TIPS
Better to create symlinks with full paths; it then works as expected