Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Unison(双向文件同步程序)手册中,当您设置-times=true首选项时,只有文件的时间戳保持不变,而不是目录:
-times=true
从手册:
times 当这个标志设置为 true 时,文件修改时间(但不是目录修改时间)被传播。
我想看看在同步期间是否有任何方法可以保留目录时间?
在查看了Unison 手册后,看来这个问题的答案是否定的。
这个未解决的问题说这是不可能的,而且实施起来也很重要。
您可以unison先同步,然后再rsync -r --times --size-only --existing同步已经存在的路径上的时间。
unison
rsync -r --times --size-only --existing