我在Windows下使用cwRsync 5.4.1 x86免费并试图将文件夹同步到网络驱动器。 我执行以下命令:cwRsync,网络驱动器,文件修改时间问题
rsync.exe -rLtv --delete --ignore-errors "/cygdrive/d/1/" "/cygdrive/z/ZipNB/"
其中d是本地驱动器和Z是网络驱动器 执行几次(连接到路由器,RT-N16外部HDD)给出相同的结果:
>rsync.exe -rLtv --delete --ignore-errors "/cygdrive/d/1/" "/cygdrive/z/ZipNB/"
sending incremental file list
./
1.pdf
sent 11,893,922 bytes received 38 bytes 1,829,840.00 bytes/sec
total size is 11,890,918 speedup is 1.00
我在文件夹中有一个文件,它发送每个执行的内容。文件每次都是一样的,中间没有改变。
如果我增加额外的参数--size,只有它按预期工作:
>rsync.exe -rLtv --delete --ignore-errors --size-only "/cygdrive/d/1/" "/cygdrive/z/ZipNB/"
sending incremental file list
./
sent 72 bytes received 22 bytes 188.00 bytes/sec
total size is 11,890,918 speedup is 126,499.13
DIR为两个目录:
D:\1>dir
Volume in drive D is XXX
Volume Serial Number is XXXX-XXX
Directory of D:\1
08.12.2016 10:04 <DIR> .
08.12.2016 10:04 <DIR> ..
24.11.2016 18:31 11 890 918 1.pdf
1 File(s) 11 890 918 bytes
Z:\ZipNB>dir
Volume in drive Z is BackUp (at Portable)
Volume Serial Number is XXXX-XXX
Directory of Z:\ZipNB
08.12.2016 10:04 <DIR> .
08.10.2016 20:40 <DIR> ..
24.11.2016 18:31 11 890 918 1.pdf
1 File(s) 11 890 918 bytes
我不知道,但我所知的rsync默认通过修改时间和大小来验证文件。这两个文件似乎相同。但似乎cwRsync出于某种原因在Z驱动器上获取/设置了错误的修改日期。如果两个目录都位于本地驱动器上,则cwRsync会正常工作。它只发生在网络驱动器上。
在Windows属性中,修改时间在1秒内有所不同,这会导致问题。
我只拿一个文件作为例子来简化输出,情况是一样的,任何数量的不同文件都是一样的。它总是发送每个文件的全部内容。 这里有什么可能是错的,我该如何修复它?