cd $HOME
watch - display a progress bar
As Julien pointed out, the Debian Administration website has some nice articles about “Commands you might have missed”. I came across this article ab
out watch, which repeatedly run a command.
watch 't=`ls -la | wc -l`;perl -e "print \"[\",\"x\"x($t),\".\"x(18-$t),\"]\n\";"'
which outputs something like:
Every 2.0s:
[xxxxxxxxxxxxx.....]
Each x represents a file which has already been transferred. In this example, I can see quickly that 5 files still need to be transferred.
By the way, this snippet to draw bars is quite handy. Here is what I use to get visually the space remaining on a drive:
server ~% t=`df -h | grep hdr42 | awk '{print $3/$2*50}'`;perl -e "print \"[\",\"x\"x($t),\".\"x(50-$t),\"]\n\";"
[xxxxxxxxxxxxxxxxxxxxxx................]





Comments