unison is a very useful tool to synchronize filesystems, for instance between different machines. It detects conflicts and asks the user about them before actually copying anything (user then decides which version of the file to copy into the other, or whether to ignore changes for the conflicting file altogether).

In that respect, it serves a specific purpose that cannot be fulfilled by rsync, which only copies files in one direction and thus mirrors one filesystem into another.

However, whereas rsync somehow manages to preserve file creation dates, unison does not. This can be a drawback if the purpose of synchronizing is to be able to switch working between say a desktop and a laptop while wanting to preserve the exact same filesystem, creation dates and all.

So the question is: is there some way to coax unison into preserving file creation dates like rsync does? (nothing to that effect appears in any obvious way in the documentation pointed to by the link in the first word of this question)


There's the preference times, give it a try. The doc mentions modification time, but doesn't say anything about creation time, so you'll have to test the exact behaviour, which may also depend on the filesystem type.

  • Somehow I missed that one. It does the job for regular files, but not for directories and symlinks (with an ext4 filesystem). Quite useful already, though. – Dalker Jan 16 '18 at 11:02

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.