1

I would like to have 2 folders with almost the same content - all subfolder, all files should be the same except 2 files. If I change something in one folder (file content, create new file, delete some file), then it should be changed in the second folder except these 2 files. Can I achieve the same with symlinks? How to create them?

1 Answer 1

-1

You can achieve this by wiping out the secondary folder, and making the secondary folder a symlink to the primary storage folder.

To create a symlink in OSX, open a terminal window, and do the following:

cd <primary_directory_path_parent_directory>
ln -s <path_to_secondary_directory> <primary_directory_name>

This should take care of what you're looking for.

5
  • But how to handle these 2 files, which should be different in these 2 folders?
    – LA_
    May 21, 2014 at 16:23
  • You can't handle the 2 files requirement with symlinks.
    – Bruno9779
    May 21, 2014 at 17:08
  • Give them new names.
    – Matej
    May 21, 2014 at 17:30
  • @MattVoboril, they must be the same.
    – LA_
    May 23, 2014 at 15:58
  • the only other option for you is to symlink the individual files that can be linked, and just not the other 2
    – Matej
    Jun 2, 2014 at 13:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .