how to know the file system type [programming]

Philip Hallstrom freebsd at
Wed Aug 17 20:09:19 GMT 2005

> hi there
> I've been looking for a way to check the fs type
> I need to do something like this
> if NTFS do this
> if msdis do that
> if ufs2  do that
> if ext2 do this other stuff

Parse /etc/fstab?

I'm sure there are lots of other ways too...

More information about the freebsd-questions mailing list