dumpe2fs

system managementLinux
The dumpe2fs command is one of the most frequently used commands in Linux/Unix-like operating systems. dumpe2fs Dump ext2/ext3/ext4 filesystem information

Quick Reference

Command Name:

dumpe2fs

Category:

system management

Platform:

Linux

Basic Usage:

dumpe2fs [options] [arguments]

Common Use Cases

  • 1

    Filesystem inspection

    Examine ext2/3/4 filesystem metadata and structure

  • 2

    Disk troubleshooting

    Diagnose issues with filesystem structure or corruption

  • 3

    Superblock recovery

    Identify backup superblocks for filesystem recovery

  • 4

    Filesystem tuning

    Analyze filesystem parameters before making adjustments with tune2fs

Syntax

dumpe2fs [options] device

Options

Option Description
-b Print bad blocks in the filesystem
-f Force dumpe2fs to display a filesystem even with unknown features
-h Only display the superblock information, not all the block group information
-i Display the filesystem data from an image file created by e2image
-o Specify filesystem options
-x Print the detailed group information in hexadecimal format

Examples

How to Use These Examples

The examples below show common ways to use the dumpe2fs command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

# Basic Examples Basic
dumpe2fs /dev/sda1
Display detailed information about the ext filesystem on /dev/sda1.
dumpe2fs -h /dev/sda1
Display superblock information only, omitting block and inode information.
# Advanced Examples Advanced
dumpe2fs -b /dev/sda1 Display blocks that are marked as bad in the filesystem. dumpe2fs -f /dev/sda1 Force dumpe2fs to display a filesystem even if there are features it doesn't understand. dumpe2fs -x /dev/sda1 Display detailed information in hexadecimal format. dumpe2fs -o superblock=1 /dev/sda1 Use the alternative superblock located at block number 1.

Try It Yourself

Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

Understanding Syntax

Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

Notes

The dumpe2fs command displays the super block and blocks group information for the filesystem present on a given device. It's commonly used by system administrators to examine filesystem health and metadata. This command requires root privileges to run in most cases, as it needs direct access to disk devices. The output includes information such as block counts, inode counts, filesystem features, mount options, and block group details.

Tips & Tricks

1

Use the -h option to display only the superblock information

2

Use the -b option to view blocks marked as bad in the filesystem

3

Use the -f option to force display of filesystems with unknown features

4

Use the -o superblock=X to specify an alternative superblock

5

Root privileges are typically required to run this command

Common Use Cases

Filesystem inspection

Examine ext2/3/4 filesystem metadata and structure

Disk troubleshooting

Diagnose issues with filesystem structure or corruption

Superblock recovery

Identify backup superblocks for filesystem recovery

Filesystem tuning

Analyze filesystem parameters before making adjustments with tune2fs

Bad block identification

Locate blocks marked as bad in the filesystem

Related Commands

These commands are frequently used alongside dumpe2fs or serve similar purposes:

Use Cases

1

Filesystem inspection

Examine ext2/3/4 filesystem metadata and structure

2

Disk troubleshooting

Diagnose issues with filesystem structure or corruption

3

Superblock recovery

Identify backup superblocks for filesystem recovery

4

Filesystem tuning

Analyze filesystem parameters before making adjustments with tune2fs

5

Bad block identification

Locate blocks marked as bad in the filesystem

Learn By Doing

The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the dumpe2fs command works in different scenarios.

$ dumpe2fs
View All Commands