xfs
[Top] [All Lists]

Re: Checking FS type

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Checking FS type
From: Keith Matthews <keith_m@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Jan 2004 08:50:32 +0000
In-reply-to: <Pine.LNX.4.44.0401101747261.31575-100000@stout.americas.sgi.com>
Organization: Frequentous Consultants Ltd
References: <40007A49.4060907@r00td0wn.net> <Pine.LNX.4.44.0401101747261.31575-100000@stout.americas.sgi.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Sat, 10 Jan 2004 17:51:44 -0600 (CST)
Eric Sandeen <sandeen@xxxxxxx> wrote:

> From userspace you can use stat(1) "stat -f" and it will tell you
> the filesystem type; older stats don't know about xfs,
> so you might need to look for the raw magic number,
> 0x58465342 ("XFSB")
> 
> To do it from C, see statfs(2), and use the f_type result.
> 


Note - not all distros ship with this as standard. 

SuSE does, so does RH. Rock and Slackware do not.

I've not got any others to hand to try.


<Prev in Thread] Current Thread [Next in Thread>