I did, and there's also File::Size, but both only total file sizes or blocks, disregarding hard links/duplicate inodes. And both do not have the equivalent of "du"'s -c option which I need.
Anyway, the reason I wrote this is to count the number of files as well as the disk usage in one go, because I thought it might be more efficient than a call to "du" followed by "find".
Turns out "du" has -a which can be used to count number of files/subdirs, so my current du() calls out the "du" command now. I'm moving my original du() to du_perl(), for later playing.
|