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?

Alon Gubkin
  • 666
  • 3
  • 7
  • 12

2 Answers2

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.

JamesRyan
  • 8,138
  • 2
  • 24
  • 36
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
theotherreceive
  • 8,235
  • 1
  • 30
  • 44