Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!gwyn@brl-vld From: gwyn%brl-vld@sri-unix.UUCP Newsgroups: net.unix Subject: Re: Question about ustat(2) and free disk space Message-ID: <16862@sri-arpa.UUCP> Date: Wed, 22-Feb-84 03:40:52 EST Article-I.D.: sri-arpa.16862 Posted: Wed Feb 22 03:40:52 1984 Date-Received: Fri, 2-Mar-84 08:13:14 EST Lines: 13 From: Doug Gwyn (VLD/VMB)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).