Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
i want to sync two folder biased on latest modification time the case [Sooner or later I have to handle collisions (someone/something modified both files - How i can merge changes or just overwrite older version).] is appear –  Eng Al-Rawabdeh Aug 2 '11 at 10:15
    
i will delete the Unix and aix tag "sorry" .. yes my question related to unison tool not to os :) –  Eng Al-Rawabdeh Aug 2 '11 at 10:32

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
i have another ... when i delete folder from server the unison also delete it from another server but i want to disable delete and enable copy i need always the folder have the same file –  Eng Al-Rawabdeh Aug 3 '11 at 12:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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