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?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
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.
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