HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

debugfs — An interactive ext2/ext3/ext4 filesystem debugger. More information: <https://manned.org/debugfs>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandext3ext4clidebugfsfilesysteminteractiveext2
linux

Problem

How to use the debugfs command: An interactive ext2/ext3/ext4 filesystem debugger. More information: <https://manned.org/debugfs>.

Solution

debugfs — An interactive ext2/ext3/ext4 filesystem debugger. More information: <https://manned.org/debugfs>.

Open the filesystem in read only mode:
debugfs {{/dev/sdXN}}


Open the filesystem in read write mode:
debugfs -w {{/dev/sdXN}}


Read commands from a specified file, execute them and then exit:
debugfs -f {{path/to/cmd_file}} {{/dev/sdXN}}


[Interactive] View the filesystem stats in debugfs console:
stats


[Interactive] Close the filesystem:
close -a


[Interactive] List all available commands:
lr

Code Snippets

Open the filesystem in read only mode

debugfs {{/dev/sdXN}}

Open the filesystem in read write mode

debugfs -w {{/dev/sdXN}}

Read commands from a specified file, execute them and then exit

debugfs -f {{path/to/cmd_file}} {{/dev/sdXN}}

[Interactive] View the filesystem stats in debugfs console

stats

[Interactive] Close the filesystem

close -a

Context

tldr-pages: linux/debugfs

Revisions (0)

No revisions yet.