8

与 rsync 一起使用--stats时,您会在传输日志的底部获得一份报告。

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

我想转换Total file sizeTotal transferred file size就地到GB,所以它变成了

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

问题

那应该怎么做?

4

1 回答 1

17

rsync --stats -h /your /paths --and --options

-h代表人类可读。

于 2012-09-20T11:41:51.127 回答