Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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