dumpe2fs Command Examples in Linux

The dumpe2fs command is used to dump ext2, ext3, and ext4 file system information. It prints the superblock and block group information for the selected device. This can be useful when troubleshooting a faulty file system.

Syntax

The syntax of the dumpe2fs command is:

# dumpe2fs [options] {device/ file system name}

dumpe2fs Command Options

The dumpe2fs command has various options.

Option Used To
-b Print a detailed report about block numbers in the file system.
-x Print the bad blocks in the file system.
-f Force the utility to display the file system status irrespective of the file system flags.
-i Display file system data from an image file created using the e2image command.

dumpe2fs Command Examples

1. To dump the file system information about a device:

# dumpe2fs /dev/sda1 

2. To print the blocks which are reserved as bad in the filesystem:

# dumpe2fs -b /dev/sda2 

3. To use the block superblock when examining the filesystem:

# dumpe2fs -o superblock=superblock /dev/sda1 

4. To use blocks of blocksize bytes when examining the filesystem:

# dumpe2fs -o blocksize=blocksize /dev/sda1 

5. To force dumpe2fs to display a filesystem:

# dumpe2fs -f /dev/sda1 

6. To only display the superblock information:

# dumpe2fs -h 

7. To display the filesystem data from an image file created by e2image:

# dumpe2fs -i 

8. To print the detailed group information block numbers in hexadecimal format:

# dumpe2fs -x 

9. To get the version info:

# dumpe2fs -V 
Related Post