Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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.