Rsync 的 -u
标志可以防止覆盖已修改的目标文件。如何获取由于此标志未发送的文件列表?-v
标志将告诉我哪些文件被发送了,但我想知道哪些文件没有被发送。
Rsync 的 -u
标志可以防止覆盖已修改的目标文件。如何获取由于此标志未发送的文件列表?-v
标志将告诉我哪些文件被发送了,但我想知道哪些文件没有被发送。
来自rsync手册:
在我的测试中,使用rsync 3.0.8时,-i, --itemize-changes
Requests a simple itemized list of the changes that are being made to each file, including attribute changes. This is exactly the same as specifying --out-format='%i %n%L'. If you repeat the option, unchanged files will also be output, but only if the receiving rsync is at least version 2.6.7 (you can use -vv with older versions of rsync, but that also turns on the output of other verbose messages).
-ii
选项无法工作,但是-vv
可以。具体情况可能因人而异。--dry-run
和--existing
来获得基本相同的信息。因此,如果您的常规传输如下所示:rsync --update --recursive local:/directory/ remote:/directory/
rsync --dry-run --existing --recursive remote:/directory/ local:/directory/
但是使用-vv
或-ii
更安全,更不容易被误解。