Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!csli!gandalf From: gandalf@csli.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.unix.questions Subject: Re: checking disk space from c program Message-ID: <3448@csli.STANFORD.EDU> Date: 11 Apr 88 04:49:54 GMT References: <398@wpg.UUCP> <71@kenobi.UUCP> Reply-To: gandalf@csli.stanford.edu (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 22 In article <71@kenobi.UUCP> ford@kenobi.UUCP (Mike Ditto) writes: >... >Read /etc/mnttab to see what devices are mounted, and use the ustat >system call to check the status of each. Or, if you are wondering how >big you can make a certain file, you can also stat() the file (or the >directory in which you intend to create it) to see what device it is >on, and ustat() that. >... The problem with ustat is that it doesn't exist on BSD systems (even on Suns), and the problem with stat is that you can't get the whole information without actually reading the super-block, i.e. without having root privileges. Normal users have to stick with "df" pipes thru some filter. Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA Disclaimer: The opinions expressed herein are those of my cat. -- Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA