How i can use unison to sync. files of folder with the latest modification time

unison

I have to handle collisions (someone/something modified both files – How i can merge changes or just overwrite older version).

In other word I want to sync folders with the latest modification time of its file

Example :- folder_1/file.txt changed at 12:30 folder_2/file.txt changed at 12:35

I want to execute ./unison to give me the following result :- update file with regards to latest modification time so that update file folder_1/file.txt to became the same file folder_2.file.txt

Best Answer

Use the option -prefer newer, see also the unison manual

Related Topic