0

I have looked this topic up and found two answers:

How can I sync two local directories?

How to sync two folders with command line tools?

The interesting thing is, the two commands for rsync, one with and another without the -u option made a big difference:

rsync -av --progress --delete "/folder/" "/somewhere/folder"

vs

rsync -avu --progress --delete "/folder/" "/somewhere/folder"

The one with the -u option only copied the files names, the actual size is 0B.

Why is that happening? Shouldn't it also copy the actual bits too?~~

New question that is more specific: How does the rsync -u option help syncing two folders?

  • I'm unable to replicate this on my machine. Can you try again (with a clean destination) and with -i added? Is there a difference in the output with and without -u? (Can add it to the question). – BowlOfRed Mar 09 '22 at 17:02
  • No there is not a difference, I will investigate this issue some more than update the question. –  Mar 09 '22 at 18:56

1 Answers1

0

The documentation for rsync explains that -u (--update) only updates files that are not newer on the destination. See man rsync.

If your files on the source are not newer than the corresponding files on the destination no changes will be made - even if the files have differences.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
  • There is a change, the new stuff, folders and files get copied over, but only the name and not the actual bits. –  Mar 09 '22 at 15:18