0

I've sym-linked a directory, and now I want to change a specific file in the linked directory, without changing it in the target directory. I don't want to copy the whole directory.

What can I do?

5

You can't, there is only 1 directory. You need to unlink the folder and link just the files or subfolders apart from the one that needs to be different.

0

James is right, you can't change them because it's the same directory.

Assuming you have no subdirectories it's pretty easy to link everything individually

/path/to/dir2$ find /path/to/dir1 -maxdepth 1 -type f  -print0 | xargs -0 -n1 ln -s

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.