dumpe2fs command in Linux with examples
dumpe2fs command is used to print the super block and blocks group information for the filesystem present on device.
- Can be used with ext2/ext3/ext4 filesystem for information.
- The printed information may be old or inconsistent when it is used with a mounted filesystem.
- Don’t forget to unmount your partition before using this command.
umount device
Syntax:
dumpe2fs [ -bfhixV ] [ -o superblock=superblock ] [ -o blocksize=block-size ] device
Options:
- b : Used to get the blocks which are reserved as bad in the filesystem.
- o superblock=superblock : It uses the superblock during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
- o blocksize=blocksize : It uses the blocksize during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
- f : Used to force dumpe2fs to display a filesystem even though it may have some filesystem feature flags which dumpe2fs may not understand.
- h : It will only display the superblock information and not any of the block group descriptor detail information.
- i : Used to show the filesystem data from an image file created by e2image, using device as the pathname to the image file.
- x : Display the detailed group information block numbers in hexadecimal format.
- V : Display the version number of dumpe2fs and exit.
Superblock: It is a record of the characteristics of a filesystem. It includes information about size, block size, empty and the filled blocks. Linux also maintains a copy of its superblock< in memory. If you are unable to mount your device, this can be due to a Corrupted superblock.
Examples:
- Displaying superblock information:
sudo dumpe2fs -h /dev/sda3

- Displaying Information of block groups:
sudo dumpe2fs /dev/sda3

This displays information about block groups. Notice Primary superblock

- Observing more about superblocks:
sudo dumpe2fs /dev/sda4 | grep -i superblock
Displays all available superblocks with discriptors. - Displaying the version of dumpe2fs:
sudo dumpe2fs -V

Recommended Posts:
- last command in Linux with Examples
- cal command in Linux with Examples
- gdb command in Linux with examples
- let command in Linux with Examples
- tar command in Linux with examples
- gs command in Linux with Examples
- rm command in Linux with examples
- dc command in Linux with examples
- bc command in Linux with examples
- arp command in Linux with examples
- gcc command in Linux with examples
- yes command in Linux with Examples
- cpp command in Linux with Examples
- fc Command in Linux with Examples
- bg command in Linux with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



