Question about ustat(2) and free disk space

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Wed Feb 22 18:40:52 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

ustat(2) is in UNIX System III and V, as documented in the manual.
You pass it a pointer to a buffer to receive the information, which
includes total free blocks, free inodes, file system name, and pack
name.  There is also an argument to specify the device, of course.
The information is stored in the file system super-block.

It should be obvious how "df" works from the above description.

In the absence of this information, one has to scan the disk and tally
up the free space.  This is not only slow and tedious, it also requires
read access to the raw device (i.e. super-user permission).



More information about the Comp.unix mailing list