I have two directories, with files in both of them:

        |- file1


        |- dir1/
        |- file2
        |- file3

I need to create a symlink so that all the content in ./write/pub/ is readable also in ./read/pub/, but I would like some kind of hybrid directory.

Is it possible to symlink directly the real directory ./read/pub/ to ./write/pub/, instead of symlinking all its content? So I could have the possibility to put files in both directory and not have the files in ./read/pub/ present in ./write/pub/, AND the new files in ./write/pub/ will appear automatically in the ./read/pub/ directory, without recreating the symlinks each time.

PS - I don't think it is possible, but would like to know if you have some kind of solution isntead.

1 Answer 1


What you want can be achieved by a union mount.

The information in the wikipedia article should get you started: https://en.wikipedia.org/wiki/Union_mount

  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – BenjiWiebe
    Jul 14, 2014 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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