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?
Better to create symlinks with full paths; it then works as expected
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.