[comp.unix.wizards] How do you tell how much disk free is remaining

jiro@shaman.com (Jiro Nakamura) (05/05/91)

A question to you NeXT and UNIX wizards -
	How does one tell how much disk space one has on any  
particular volume? In other words, how does "df" work? The mntent  
doesn't give much information about the mounted entry.....
	This is for a NeXT (BSD4.3) system, BTW.
	What I want/have to do is to do some space checking before my  
application saves to make sure there is enough space to safe the  
document on. I could always run a "system" call, but this is  
wasteful, to say the least......

	- jiro nakamura
	jiro@shaman.com

ps. Replies via e-mail, s'il vous plait. :-)
	

torek@elf.ee.lbl.gov (Chris Torek) (05/05/91)

In article <9105041944.AA09678@shaman.com> jiro@shaman.com
(Jiro Nakamura) writes:
>	This is for a NeXT (BSD4.3) system, BTW.

NeXTs do not run 4.3BSD.

Suns do not run 4.3BSD (not even mine---when it runs my stuff, which
it does not, quite, this is *not* 4.3BSD but rather something between
4.3reno and 4.4).  Suns generally run SunOS (some run Sprite).

Nothing that is not a VAX is capable of running 4.3BSD.

The Tahoe series can run 4.3BSD-tahoe and 4.3BSD-reno.

Some HP 680x0 boxes can run 4.3BSD-reno and/or HP-BSD (which is not
4.3BSD, again).

4.3BSD-tahoe and 4.3BSD-reno are not 4.3BSD (they are close, but not
identical).

Incidentally, the same problem applies to System V, only more so, as
the name appearing on the documentation may claim `System V Release N'
yet the system may be (and often is) significantly different from the
same name `System V Release N' on some other architecture.  At least
4.3BSD-tahoe and 4.3BSD-reno are built from a single source tree, so
that any time programs differ in behaviour on different architectures,
save for deliberate architecture dependencies such as device drivers,
it is a bug, rather than a feature.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov

guy@auspex.auspex.com (Guy Harris) (05/07/91)

 >>	This is for a NeXT (BSD4.3) system, BTW.
 >
 >NeXTs do not run 4.3BSD.

And that is more than just a quibble over terminology, it's relevant to
the question; 4.3BSD doesn't have "statfs()", but, apparently, the OS on
NeXTs does.  Had someone given the 4.3BSD answer, it wouldn't have been
the best answer....