I ran rsync
with nohup
and --progress
:
nohup rsync --progress --[other-options] source destination &
tail -f nohup.out
When I'm tailing the file, I see the output with a changing last line (where the progress is being shown):
folder/file.ext
40469819 100% 2.74MB/s 0:00:14 (xfer#1, to-check=10076/10079)
But when I open nohup.out
in a text editor, I see every change as a separate line:
folder/file.ext
32768 0% 0.00kB/s 0:00:00
2523136 6% 2.10MB/s 0:00:17
3702784 9% 1.63MB/s 0:00:22
7372800 18% 2.22MB/s 0:00:14
9994240 24% 2.28MB/s 0:00:13
13107200 32% 2.47MB/s 0:00:10
16384000 40% 2.97MB/s 0:00:07
19070976 47% 2.73MB/s 0:00:07
22642688 55% 2.91MB/s 0:00:05
25722880 63% 2.94MB/s 0:00:04
28934144 71% 2.91MB/s 0:00:03
32178176 79% 3.06MB/s 0:00:02
35422208 87% 2.98MB/s 0:00:01
38240256 94% 2.92MB/s 0:00:00
40469819 100% 2.74MB/s 0:00:14 (xfer#1, to-check=10076/10079)
I'm worried this could quickly grow the nohup.out
file and eat up my disk space.
Is there a way to make rsync
show a simple progress indication, like this?
For 55% (my imaginary rsync
is simply appending characters for each percentage):
folder/file.ext
===='===="===='===="===='===="===='===="===='===="
===='
When done, it would show the same summary for 100%:
folder/file.ext
===='===="===='===="===='===="===='===="===='===="
===='===="===='===="===='===="===='===="===='===="
40469819 100% 2.74MB/s 0:00:14 (xfer#1, to-check=10076/10079)
This way the nohup.out
would not bloat (especially for large files), and would have the same content as what's shown when I tail it.
Possible or any alternatives? I saw --log-file
option (a bit too late) I'm not sure if it will be helpful (can I still monitor the progress by tailing the log file?)
Edit: I have tried the --log-file
option (don't add --progress
; if you use -P
, change it to --partial
). Although it logs some useful progress to the log file, it won't show the percentages. It's good enough as long as you don't care about the percentage.