What, exactly, are stat.st_blocks, statfs.f_b

Rahul Dhesi dhesi%cirrusl at oliveb.ATC.olivetti.com
Wed Mar 6 19:06:39 AEST 1991


I think it's safe to say that most users who use "du" and "df" care
about the number of kilobytes and not much about the block size.  When
4.3BSD seemed to be standardizing on a block size of 1K in such
reports, I was happy, especially because the existence of fragments
meant, to those wondering about disk space wasted due to fragmentation,
that the block size was no longer as important.

Then POSIX came along, and SVR4 reared its ugly head too.  Now I'm
really depressed.

Maybe it's time for a new field in the stat struct called something
like st_kbytes, and fields in the statfs struct called something like
f_kbfree and f_kbavail.
--
Rahul Dhesi <dhesi%cirrusl at oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi



More information about the Comp.unix.internals mailing list