Trying to find the total usage for each of the file types by extension, then here is a quick bash function for you :
disk_usage_type () { find . -name '*'$1 -ls | awk ' BEGIN{ a[0]="Bytes"; a[1]="KB"; a[2]="MB"; a[3]="GB"; } {sum+=$7; files++;} END{ print "Total sum is ::\t" sum; print "Total files ::\t" files; while (sum > 1024) { sum=sum/1024; count++; }; print sum" "a[count]; }' } Just define the function in one of your bash startup files.
Continue reading