Martin Schulze wrote:
> please consider adding <http://www.mkp.net/fstyp/> alias
> fstyp - identify filesystem
> to the morutils package.

file(1) can also detect many filesystems. The only real problem is
parsing the filesystem type out of the other output if using it
programatically:

[EMAIL PROTECTED]:~>file debian-testing-i386-netinst.iso foo
debian-testing-i386-netinst.iso: ISO 9660 CD-ROM filesystem data 'Debian 
testing i386 Bin-1      ' (bootable)
foo: Linux rev 1.0 ext3 filesystem data

The --mime option almost, but not quite works:

[EMAIL PROTECTED]:~>file --mime debian-testing-i386-netinst.iso foo
debian-testing-i386-netinst.iso: application/x-iso9660
foo:                             application/octet-stream

This seems to just be a limitation of /usr/share/file/magic.mime for not
listing mime types for all the filesystems. Perhaps it would be better
to fix that than to introduce a new tool? 

Alternatively, a specialised magic file could be written that only had
the magic numbers for filesystems, and only output the machine-readable
filesystem type.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to