6

In the Unison (two way file syncing program) manual, when you set the -times=true preference, only the time stamps of the files are kept unchanged, not the directores:

From the Manual:

times When this flag is set to true, file modification times (but not directory modtimes) are propagated.

I wanted to see if there is any way the directory time could also be preserved during a sync?

makhlaghi
  • 3,856
  • 6
  • 27
  • 34

2 Answers2

2

After looking through the Unison manual, it appears that that answer to this question is No.

Mike Pierce
  • 1,390
  • 1
  • 12
  • 35
2

This open issue says that it's not possible, and non-trivial to implement.

You could unison first, then rsync -r --times --size-only --existing afterwards to sync just the times on paths which already exist.

Tom Hale
  • 40,825
  • 36
  • 187
  • 242