Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is just a "I feel curious" question. When syncing locally (that is, from one drive to another on the same host), how does rsync know which files are not worth transmitting? I guess it does not do a full file compare (since that would be too expensive). Does it only do simple checking, like:

  • file size
  • modification time

If so, I guess it would be easy to fool rsync by changing the contents of the file, keeping the size, and resetting the modification time (if at all possible).

share|improve this question

This is popular misconception - delta transfer with rsync. rsync was designed to do fastest copy, not necessary a delta copy. And to do delta copy you need to do checksums. Now, 'rsync' will NOT check which files to transmit but which files can be skipped. Usually will check on sender size/ mtime and compare with receiving end.

With rsync you have an option to do checksum on each file (I think that it's --checksum).Of course this will be slow...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.