Reputation: 1108
I found rsync
behaves differently in the following two situations:
(1) All the files are copied by using rsync
, then using rsync
again will be fast (skip all the files);
(2) Use cp
to copy files, then using rsync will be slow (or may be run freshly?)
So my confusion is "Does rsync
generate any internal things on the files so that it can refer to avoid duplicate checking?"
Upvotes: 0
Views: 472
Reputation: 49187
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.
Upvotes: 2