Which file system?

Jeff Beadles jeff at quark.WV.TEK.COM
Thu Apr 12 06:00:21 AEST 1990


reino at cs.eur.nl (Reino de Boer) writes:
>Is there a way (in C, perl, etc.) to check which filesystem a file 
>belongs to ?

Well, I can't say that it will work everywhere, but...

% df /usr/jeff/.cshrc

Filesystem    kbytes    used   avail capacity  Mounted on
/dev/ds00a    228422  156238   49341    76%    /

And...

% df /usr2/src/jeff/src

Filesystem    kbytes    used   avail capacity  Mounted on
/dev/ds06a    274074  220359   26307    89%    /usr2


If you really enjoy pain (:-)  You can use "stat" and look at st_dev.

	-Jeff

-- 
Jeff Beadles				jeff at quark.WV.TEK.COM 
Utek Engineering, Tektronix Inc.	+1 503 685 2568
			"Credo quia absurdum"



More information about the Comp.unix.questions mailing list