From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f674433f633a193e X-Google-Attributes: gidfee84,public From: Bob Harris Subject: Re: Free Space On a Disk Date: 1999/11/27 Message-ID: <271119991722022091%harris@zk3.dec.com>#1/1 X-Deja-AN: 553878732 Content-Transfer-Encoding: 8bit References: <383B6AA9.611265B5@swecexc.xko.dec.com> To: GopalKrishna Prasad Posted-And-Mailed: yes Content-Type: text/plain; charset=ISO-8859-1 Organization: Digital Equipment Corporation, Palo Alto, CA, USA Mime-Version: 1.0 User-Agent: YA-NewsWatcher/4.2.5 Newsgroups: comp.unix.osf.osf1 [[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <383B6AA9.611265B5@swecexc.xko.dec.com>, GopalKrishna Prasad wrote: > I want to extract amount of free space available on a disk (for >example rz0). How can I do this in a C program ? use the statvfs() or statfs() system calls. statvfs() is the POSIX standard way to do this, however, it lacks some host OS specific features. The statvfs structure is defined in the header file. statfs() is what is used by the df utility, but the values that it returns may not be available on all UNIX implementations. The statfs structure is defined in the header file.