Actually, you kind of answered your own question, since your original command already has it: --progress
This is the correct option, although the man page is a bit cryptic about it:
--progress show progress during transfer
-P same as --partial --progress
It kinda makes sense, since you invoke your rsync
string with dryrun mode, no transer happens, but you'd still have progress: namely the files that have changed and would be transferred.
This way you get a neat little list of all the files, for example:
The destination already has a copy of changedfile which was updated in the source and oldfile, which remains unchanged. The source has also an additonal file: newfile.
#~$ ls -lhan /tmp/destination/
total 20K
drwxrwxr-x 2 1000 1000 4,0K Jän 31 09:07 .
drwxrwxrwt 18 0 0 12K Jän 31 09:15 ..
-rw-rw-r-- 1 1000 1000 2 Jän 31 09:08 changedfile
-rw-rw-r-- 1 1000 1000 0 Jän 31 09:07 oldfile
#~$ ls -lhan /tmp/source/
total 20K
drwxrwxr-x 2 1000 1000 4,0K Jän 31 09:07 .
drwxrwxrwt 18 0 0 12K Jän 31 09:15 ..
-rw-rw-r-- 1 1000 1000 2 Jän 31 09:15 changedfile
-rw-rw-r-- 1 1000 1000 0 Jän 31 09:07 newfile
-rw-rw-r-- 1 1000 1000 0 Jän 31 09:07 oldfile
If we then invoke your rsync command, but remove itemization -i
and just add dryrun -n
#~$ ~$ rsync -n -rza --progress --stats --ignore-times --checksum /tmp/source/ /tmp/destination/
sending incremental file list
changedfile
newfile
Number of files: 4 (reg: 3, dir: 1)
Number of created files: 1 (reg: 1)
Number of deleted files: 0
Number of regular files transferred: 2
Total file size: 2 bytes
Total transferred file size: 2 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 187
Total bytes received: 22
sent 187 bytes received 22 bytes 418.00 bytes/sec
total size is 2 speedup is 0.01 (DRY RUN)
You get a list of only the files rsync would tranfser: changedfile and newfile.