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.
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
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|126.96.36.199|:21... connected. Connecting to ftp.archlinux.org|188.8.131.52|:21... connected. Connecting to ftp.nethat.com|184.108.40.206|: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'
.oO Komodo Dave Oo.
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