Make rsync show progress on checksum comparison, even if no difference is being found

I run this command to check the identicalness of two folders and put all differences into a log file:

rsync -av --delete --checksum --dry-run --stats --itemize-changes --out-format='%t %i %f ' SOURCE DESTINATION | tee log.txt

If there is no difference among the files you are comparing, rsync will not mention anything except this until the end of the job:

sending incremental file list

It would be nice to get some information on where rsync is at. Especially if you compare a lot of files. Is it possible to make rsync print all checks into the terminal and leave only the differences in the log file?

PS: --info=progress2 did not help.


[I see that you want a list of the files that rsync is calculating the checksum of, as those checksums are being calculated. From my reading, it doesn't look like that's available. I give some more general information below on how rsync reports works in relation to how it reports progress as I understand it.]

If there are files to transfer, then the --info=progress1 switch ("per-file progress") would give you some progress information. As each file is transferred, it will give you something that looks like this:

MD5SUMS.gnome
        141   0%    0.00kB/s    0:00:00 (xfr#1, to-chk=11/13)
ParrotSecurity.lnk
        179   0%   37.11kB/s    0:00:00 (xfr#2, to-chk=10/13)
SHA256SUMS.mate
        486   0%  336.91kB/s    0:00:00 (xfr#3, to-chk=9/13) 
SHA256SUMS.mate.gpg
      1,419   0%    1.22MB/s    0:00:00 (xfr#4, to-chk=8/13)
SHA256SUMS.ubuntu
      1,994   0%    1.77MB/s    0:00:00 (xfr#5, to-chk=7/13)
SHA256SUMS.ubuntu.gpg
      2,927   0%    2.66MB/s    0:00:00 (xfr#6, to-chk=6/13)

xfer tells you which file is being transferred (xfer#6 is the 6th), and to-chk (say to-chk=6/13) tells you that it's the 6th out of 13.

Notice that you will not get this in a --dry-run as there is nothing to transfer. (You may also get this output with --progress, though it's not clear from the man page, and I won't check right now.)

If you look at --recursive in the man page, you will see that since version 3.0.0, rsync -r will check a few directories before getting started and then continue to check them while transferring. This is "incremental recursive" scanning, and in that case you will see ir-chk rather than to-chk. And, the "denominator" in ir-chk can increase as it progressively scans more files.

If you were not using --recursive, the checksum is done first to identify all of the files that have to be transferred, and then they are transferred one by one. It does not appear that you can get any kind of progress report on the initial phase in which the checksums are being calculated, since rsync doesn't yet know how many files there will be or how big they are. As to whether you can get a list of file names as their checksums are calculated, from my reading it doesn't appear so. (But there could be a neat trick, and it's hard to prove a negative!)