Xref: utzoo comp.unix.questions:23367 comp.sys.pyramid:857 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!mips!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz (Boyd Roberts) Newsgroups: comp.unix.questions,comp.sys.pyramid Subject: Re: getting 'df' info from inside a program? Message-ID: <1787@necisa.ho.necisa.oz> Date: 29 Jun 90 00:15:21 GMT References: <797@massey.ac.nz> <3394@sactoh0.UUCP> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 21 In article <3394@sactoh0.UUCP> jak@sactoh0.UUCP (Jay A. Konigsberg) writes: >In article <797@massey.ac.nz> GEustace@massey.ac.nz (Glen Eustace) writes: >>... It would be great if >>the information given in a 'df' were available with some system call. >>Does anyone know whether there is one and if so how one uses it. >> >This looks like a job for the stat() system call. (Sys V) > Gak! Chigaimasu! You require ustat(2) on Sys V or statfs(2) on NFS varients. stat(2) reports information on files, NOT _file-systems_. Aside from that, do you realise that the blocks that were there when you looked, may not be there when you actually start writing? Or will your target file-system be idle? Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''