Question: I would like to do a two-way automatic sync between folders `Directory A` and`Directory B`. This means that whenever a file in `Directory A` or one of its sub-directories is changed, that change is immediately applied to `Directory B`, and whenever a file in `Directory B` or one of its sub-directories is changed, that change is immediately applied to `Directory A`. Thus, the two directories would be completely identical, including document properties. How can I achieve this?

I am using Ubuntu 16.10. 

Symlinks are not an option.

Answer: 
For a long time I used rsync to sync my laptops(2) and a 3rd machine, then I tried with [syncthing](https://syncthing.net/) but this morning a famous search engine offered me this project:

[Mirror](https://github.com/stephenh/mirror)
--------------------------------------------

> 
> Mirror is built to support a two-machine (e.g. desktop+laptop) development workflow where you want to run a command line compile/build process on a powerful/dedicated desktop, but still edit files remotely on a laptop.
> 
> 
> 

You will also find a comparison of different solutions.

His main argument against **rsync** are : not real time and nor *officially* two ways.

*PS: I'm using it through zerotier, so my machine are always able to communicate together.*
I would recommend the `synkron` tool. This is an open-source application available for linux(and other OS's). More recent copy of the file is updated over folders based on the time stamp. The frequency of the sync is user defined. 

To install you have to build it which requires Qt 4.3 or recent version. 

Check the sourceforge page ( [synkron on sourceforge](https://sourceforge.net/projects/synkron/?source=navbar)) to download and installation details.

Advantages over `rsync+cron` and other simple approaches:

* A temporary backup is created which is saved for certain duration of time.
* Option to not propagate deletions.
* Multiple folder can be linked as masters, or slave-master configuration.

Project page - [Synkron page](http://synkron.sourceforge.net/#) / Documentation - [Synkron documentation](https://sites.google.com/site/synkrondocumentation/)