Re: How do I determine programatically what kind of file system a given file is on?



On Sat, 14 Jan 2006, in the Usenet newsgroup comp.os.linux, in article
<pan.2006.01.14.22.43.42.29303@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Jeff Silverman wrote:

>I am doing some experiments in file locking for non-cooperative processes.
>I want my program to figure out for itself what kind of file system (ext2,
>ext3, nfs, smb, etc.) the file is on, so I can compare and contrast the
>different kinds of file locking.

ok, I guess...

>Is there a way to determine what kind of file system the file is on?

Where is the file located within the directory tree?
Look in /etc/mtab and figure from there. /etc/fstab may also have similar
information.

Old guy
.