Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: filesystem type

by Tomte (Priest)
on Jun 21, 2004 at 15:57 UTC ( [id://368491]=note: print w/replies, xml ) Need Help??


in reply to filesystem type

On windows: Win32::FsType(), on unix parse the output of mount -n, under linux

my @result = (); foreach (split("\n",`mount -n`)) { push @result, (split)[0,4]; } my %result = @result;
will put the filesystem as value of the key "mountpoint" in the hash %result;

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

Replies are listed 'Best First'.
Re^2: filesystem type
by Eyck (Priest) on Jun 17, 2005 at 08:09 UTC
    mount -n will know only about supported filessytems, you can try file -s /dev/device,
    pokurcz:# file -s /dev/hda1 /dev/hda1: Linux rev 1.0 ext2 filesystem data (mounted or unclean) pokurcz:# file -s /dev/hda2 /dev/hda2: Linux/i386 swap file (new style) 1 (4K pages) size 124502 p +ages

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://368491]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-03-28 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found