UNIX: Retrieving meta-info on your file-system

Turns out there is no direct method to retrieve the information stored in the superblock for most file-systems within Unix.

Try ‘tune2fs -l /dev/hdXY’ instead, this will definitely work with ext2 and ext3:

tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: /
Last mounted on:
Filesystem UUID: c5ba8667-4b47-4074-801a-b55be89e4df9
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype needs_recovery sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 2415360
Block count: 4827532
Reserved block count: 241376
Free blocks: 2490514
Free inodes: 2028280
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16320
Inode blocks per group: 510
Filesystem created: Fri Oct 8 08:26:03 2004
Last mount time: Thu Mar 10 15:27:44 2005
Last write time: Thu Mar 10 15:27:44 2005
Mount count: 1
Maximum mount count: -1
Last checked: Thu Mar 10 15:27:41 2005
Check interval: 0 ()
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal UUID:
Journal inode: 8
Journal device: 0x0000
First orphan inode: 0


One Comment on “UNIX: Retrieving meta-info on your file-system”

  1. Punit says:

    Its better that u read the device itself.. go to the offset of superblock0 and read it into superblock structure of the filesystem… pretty ugly and filesystem dependent but wat the heck u r looking at disk level .