0

我发现rsync在以下两种情况下表现不同:

(1) 使用 using 复制所有文件rsync,然后rsync再次使用会很快(跳过所有文件);

(2)cp用于复制文件,然后使用 rsync 会很慢(或者可能是重新运行?)

所以我的困惑是“是否会rsync在文件上生成任何内部内容以便它可以引用以避免重复检查?”

4

1 回答 1

2

rsync -a (in archive mode, which I presume you ran) retains all attributes of a file, including creation/modification time. cp does not. I suppose something in the file attributes that's different when you use cp, probably a later modification time, in the destination files, made rsync think they are newer files, so it either recopied them or had to check the contents.

于 2012-04-17T08:56:38.673 回答