Never thought about using rsync for purposes different than synchronization. Yeah, well.... Recently, I ran into a situation where I had to copy a bunch of stuff from one place to another, but the size of the contents were matter of GBs, and I kind'a needed to know the progress of it, like when you so it from GUI... Searching a bit, I found that you could use rsync for that (impressively, "cp" or "mv" commands do not have such feature). So here it is: rsync --archive --verbose --human-readable --progress /path/to/origin /path/to/destination
Note: for those not familiar with rsync, read about the "--archive" option before using it. $ rsync -av --human-readable --progress --stats /path/to/origin /path/to/destination sending incremental file list video1.avi 2.96G 100% 2.03MB/s 0:23:11 (xfer#1, to-check=4/5) video2.avi 288.24M 100% 1.90MB/s 0:02:24 (xfer#2, to-check=3/5) video3.avi 302.28M 100% 1.89MB/s 0:02:32 (xfer#3, to-check=2/5) video4.avi 576.69M 100% 2.02MB/s 0:04:32 (xfer#4, to-check=1/5) video5.avi 182.67M 100% 1.84MB/s 0:01:34 (xfer#5, to-check=0/5)
Number of files: 5 Number of files transferred: 5 Total file size: 4.31G bytes Total transferred file size: 4.31G bytes Literal data: 4.31G bytes Matched data: 0 bytes File list size: 240 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 4.31G Total bytes received: 107
sent 4.31G bytes received 107 bytes 2.10M bytes/sec total size is 4.31G speedup is 1.00
|