i'm looking for a command that can sync dir1 and dir2, without swapping and deleting the files in those directories.
The current command i'm using is
rsync -av --delete dir1 dir2
which deletes files that belong to dir2 but not dir1. In other words, it will create a duplicate dir1 in a fast way.
say, for example, i add 5 files to dir2 and would like to preserve the order of the command rsync. i want to sync it back to dir1. what options of rsync are available that can help me doing this?
assume i don't want to delete any files in both directories.
unison
– a file-synchronization tool for Unix.