2007/12/03

one line perl script - monitoring file increase speed

perl -e '$l=0;while(1) { sleep 1; $m=`du -k`; $m =~ s/^\s+//; $m =~ s/\s+.\n//; @dt = localtime(time); print "". ($dt[5]+1900) ."/". ($dt[4]+1) ."/$dt[3] $dt[2]:$dt[1]:$dt[0] ". ($m-$l) ."/$m k\n"; $l=$m;}'

No comments: