[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to know the filesystem type on one block device?



On Thursday 20 December 2007 22:27:45 Magicloud Wang wrote:
> Dear,
> 	By filesystem type, I mean including swap.
> 	Mount it or `file` a dd image of it sure can tell me the filesystem. But
> these can not deal with swap, and too complax.
> 	Parted can tell this information of a partition, but can not deal with
> lvm. While `lvdisplay` can not tell.
>
> 	So, any idea?
>
> Thanks.

tim@ghostknife:~$ sudo file -s /dev/hda1
/dev/hda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
tim@ghostknife:~$ sudo file -s /dev/hda2
/dev/hda2: x86 boot sector, extended partition table (last)\011
tim@ghostknife:~$ sudo file -s /dev/hda5
/dev/hda5: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: 
e0e2c360-b902-4b72-af7f-e269205

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: