Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!orca.wv.tek.com!quark!jeff From: jeff@quark.WV.TEK.COM (Jeff Beadles) Newsgroups: comp.unix.questions Subject: Re: Which file system? Message-ID: <6767@orca.wv.tek.com> Date: 11 Apr 90 20:00:21 GMT References: <1990Apr11.091700.1253@cs.eur.nl> Sender: news@orca.wv.tek.com Reply-To: jeff@quark.WV.TEK.COM (Jeff Beadles) Lines: 27 reino@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@quark.WV.TEK.COM Utek Engineering, Tektronix Inc. +1 503 685 2568 "Credo quia absurdum"