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?
After looking through the Unison manual, it appears that that answer to this question is No.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With