Discussion:
Finding mount()ed filesystems
(too old to reply)
Nick
2003-11-06 16:15:16 UTC
Permalink
What is the best way to determine what filesystems are mounted?
Currently I open the /etc/mtab file (via setmntent(...)) and read
each record using getmntent. Is there a more direct method?

---------------------------------------
Nick Landry
www.student.math.uwaterloo.ca/~nilandry
***@student.math.uwaterloo.ca
---------------------------------------
Heiko
2003-11-09 13:53:15 UTC
Permalink
Post by Nick
What is the best way to determine what filesystems are mounted?
Currently I open the /etc/mtab file (via setmntent(...)) and read
each record using getmntent. Is there a more direct method?
The only other way I can think of, is to parse /proc/mounts.
It summarizes /etc/fstab only for currently mounted filesystems.

.Heiko
R.F. Pels
2003-11-09 19:47:56 UTC
Permalink
Post by Nick
What is the best way to determine what filesystems are mounted?
Currently I open the /etc/mtab file (via setmntent(...)) and read
each record using getmntent. Is there a more direct method?
cat /etc/mtab
--
Ruurd
.o.
..o
ooo
Loading...