note
hawson
I thought about building the sorting but decided
against it ("One tool does one thing"). I figure that I'll leave
sorting to 'sort'. ;-)<p>
As to 'df' walking the tree twice, I looked at that as well. In my tests, it looked like
the results were cached somewhere, and thus 'df -sk . *' is quite fast. A prior version of the
script did something horrible along the lines of: <code>'du -sk *|perl -e `$sum=du -sk .` while(<>) {....}</code>, so this is an improvement already.
<P>
This is pretty quick, and I use it on 40GB raid arrays. :-)
22130
24294