While reading on some blogger’s blog, found this cool tips and tricks, it is pretty interesting. Thumbs up to geek00L :)

It is very useful for copying a large file. This command below will show you the copy progress and it will not see it with a cp command.

rsync --progress -v SRC DST

Below is a first example: -

[root@localhost root]# rsync --progress -v someimage.img.gz /tmp
someimage.img.gz
63780138 100% 53.23MB/s 0:00:01
wrote 63788015 bytes read 36 bytes 42525367.33 bytes/sec
total size is 63780138 speedup is 1.00

If you would like more stats, below is a second example: -

[root@localhost root]# rsync --progress --stats -v someimage.img.gz /tmp
someimage.img.gz
63780138 100% 77.74MB/s 0:00:00
rsync[1579] (server receiver) heap statistics:
arena: 135168 (bytes from sbrk)
ordblks: 1 (chunks not in use)
smblks: 0
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 0
uordblks: 41624 (bytes used)
fordblks: 93544 (bytes free)
keepcost: 93544 (bytes in releasable chunk)
rsync[1577] (sender) heap statistics:
arena: 135168 (bytes from sbrk)
ordblks: 2 (chunks not in use)
smblks: 2
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 80
uordblks: 37520 (bytes used)
fordblks: 97648 (bytes free)
keepcost: 93552 (bytes in releasable chunk)

Number of files: 1
Number of files transferred: 1
Total file size: 63780138 bytes
Total transferred file size: 63780138 bytes
Literal data: 63780138 bytes
Matched data: 0 bytes
File list size: 41
Total bytes written: 63788015
Total bytes read: 36

wrote 63788015 bytes read 36 bytes 42525367.33 bytes/sec
total size is 63780138 speedup is 1.00