문제

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?

도움이 되었습니까?

해결책 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.

다른 팁

Better to create symlinks with full paths; it then works as expected

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top