[root@dbbg]:~/symlink# touch file1 file2 file3 [root@dbbg]:~/symlink# ln -s file1 sym1 ; ln -s file2 sym2 ; ln -s file3 sym3 [root@dbbg]:~/symlink# rsync -v -a --stats /root/symlink/ /tmp/symlink sending incremental file list created directory /tmp/symlink ./ file1 file2 file3 sym1 -> file1 sym2 -> file2 sym3 -> file3 Number of files: 7 Number of files transferred: 3 Total file size: 15 bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 104 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 242 Total bytes received: 81 sent 242 bytes received 81 bytes 646.00 bytes/sec total size is 15 speedup is 0.05 ################################## ### Number of files transferred: 3 ### ### If -l is set, this number should be 7 ### ##################################
"Transferred" has a particular meaning to rsync which involves creating the data for a file. However, stats were improved in 3.1.0 (notice that the transferred count was further qualified to say "regular files"): Number of files: 7 (reg: 3, dir: 1, link: 3) Number of created files: 7 (reg: 3, dir: 1, link: 3) Number of deleted files: 0 Number of regular files transferred: 3 [...] Thus, symlinks will now be under the created-files stat.
Yes, I updated since then, but symlinks are not counted anywhere. Thus making a system that rely on `--dry-run --stats -v |grep transferred` would fail if only symlinks are changed.
As my paste shows, they are counted in the created files. They aren't counted in the updated regular files since they aren't regular files.
THANK YOU. Somehow I've omitted this.