[SOLVED]Re: How to know the filesystem type on one block device?
On 2007年12月20日Thursday 18:59:02 Timothy wrote:
> On Thursday 20 December 2007 23:56:04 Timothy wrote:
> > 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
> This also works for swap:
> tim@ghostknife:~$ sudo file -s /dev/mapper/ghostknife-swap_1
> /dev/mapper/ghostknife-swap_1: Linux/i386 swap file (new style) 1 (4K
> pages) size 345087 pages