This is a function that I came up with earlier today that I have found useful. It tell you how many blocks of a filesystem a directory is taking up (so you can trim it down if desired):
#!/bin/sh
/bin/ls -1ARs $@ 2> /dev/null \
	| perl -e 'while(<>) {/^ *(\d*).*$/; $a+=$1 }
		   print "$a KB\n";'
Anyway... have fun, I hope it helps... it was short, so I thought I'd share.

Log in or registerto write something here or to contact authors.