When using --stats
with rsync, you get a report at the bottom of the transfer log.
Number of files: 211009
Number of files transferred: 410
Total file size: 903119614118 bytes
Total transferred file size: 9046197739 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 5864077
File list generation time: 23.204 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 5865513
Total bytes received: 1441
I would like to convert Total file size
and Total transferred file size
in place to GB, so it becomes
Number of files: 211009
Number of files transferred: 410
Total file size: 903 GB
Total transferred file size: 9 GB
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 5864077
File list generation time: 23.204 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 5865513
Total bytes received: 1441
Question
How should that be done?
rsync --stats -h /your /paths --and --options
-h
stands for human readable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With