我在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秒內有所不同,這會導致問題。
我只拿一個文件作爲例子來簡化輸出,情況是一樣的,任何數量的不同文件都是一樣的。它總是發送每個文件的全部內容。 這裏有什麼可能是錯的,我該如何修復它?