You are not logged in.

#1 2006-01-07 04:55:44

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

displaying nicer (less verbose) rsync progress

heya,

im trying to use rsync for Archie hd-install, and display its progress via --progress option. however, the output is TOO verbose - the progress is shown for each file being copied... any ideas how to reduce the output without patching the program, or just displaying last 2 lines of the progress output?

thanks in advance.

Offline

#2 2006-01-07 14:13:50

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: displaying nicer (less verbose) rsync progress

There may be a more elegant solution than this; if anyone knows of such a solution, please post so others (i.e. me) can learn wink

Anyway, here's an example of how I'd do it

sudo pacman -Sy > tmp.txt 2>&1 & watch -n 1 'grep -i connect tmp.txt'

Output from 'watch':

Every 1.0s: grep -i connect tmp.txt                                                                                                                     Sat Jan  7 14:10:22 2006

Connecting to ftp.archlinux.org|207.44.190.41|:21... connected.
Connecting to ftp.archlinux.org|207.44.190.41|:21... connected.
Connecting to ftp.nethat.com|69.64.39.21|:21... connected.

So you'd do:

rsync [parameters] > [output file] 2>&1 & watch -n 1 'grep -i [what you want to search for] tmp.txt'

HTH.


.oO Komodo Dave Oo.

Offline

#3 2006-01-09 21:15:31

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: displaying nicer (less verbose) rsync progress

thanks for the reply, but its still not quite as good as i would like it to be: the watch command clears the screen, and even if i grab both last 2 lines (1st is the filename, 2nd is the progress) it still looks clumsy. and if a user press CTRL-C then the rsync still running. I would like to have a nice progress bar, and from all i could gather until now is that maybe i should use a modified cp program which has a progress-bar support. I dont really care to use cp/rsync, as long as i can copy entire CD contents into the hd...

thanks for the hint though! i like the 'watch' trick very much smile

Offline

Board footer

Powered by FluxBB