Wednesday 18 February 2009

Total size of an arbitrary list of files

ls -lrt | grep "Feb 17" | awk '{tot += $5;ct +=1; print $9 " " $5/(1024*1024) "Mb"} END {printf(" Files : %s TOTAL SIZE %4.2f Gb\n",ct,tot/(1024*1024*1024))}'

0 comments: