man > debugfs(8)

DEBUGFS(8) – System Manager's Manual – DEBUGFS(8)

📖 NAME

debugfs – ext2/ext3/ext4 file system debugger

🚀 Quick Reference

Use CaseCommandDescription
🔍 Examine on‑disk structuresdebugfs /dev/sdXXOpen a file system in read‑only mode for inspection
✏️ Modify a file systemdebugfs –w /dev/sdXXOpen a file system in read‑write mode
📜 Run a script of commandsdebugfs –f cmd_file /dev/sdXXExecute commands from a file, then exit
⚡ Execute a single commanddebugfs –R "request" /dev/sdXXRun one debugfs command and exit
📂 List directory contentslsPrint files in the current directory
📄 Dump file contentscat filespecWrite the contents of an inode to stdout
🗑️ Recover deleted filesundel <inode_number> [pathname]Undelete an inode and optionally link it
🔧 Modify inode fieldsset_inode_field filespec field valueChange an inode attribute (e.g., i_size)

🔍 SYNOPSIS

debugfs [ -DVwcin ] [ -b blocksize ] [ -s superblock ] [ -f cmd_file ] [ -R request ] [ -d data_source_device ] [ -z undo_file ] [ device ]

📝 DESCRIPTION

The debugfs program is an interactive file system debugger. It can be used to examine and change the state of an ext2, ext3, or ext4 file system.

device is a block device (e.g., /dev/sdXX) or a file containing the file system.

⚙️ OPTIONS

📂 SPECIFYING FILES

Many debugfs commands take a filespec as an argument to specify an inode (as opposed to a pathname) in the file system which is currently opened by debugfs. The filespec argument may be specified in two forms. The first form is an inode number surrounded by angle brackets, e.g., <2>. The second form is a pathname; if the pathname is prefixed by a forward slash ('/'), then it is interpreted relative to the root of the file system which is currently opened by debugfs. If not, the pathname is interpreted relative to the current working directory as maintained by debugfs. This may be modified by using the debugfs command cd.

🛠️ COMMANDS

This is a list of the commands which debugfs supports.

🌐 ENVIRONMENT VARIABLES

👤 AUTHOR

debugfs was written by Theodore Ts'o <tytso@mit.edu>.

📚 SEE ALSO

dumpe2fs(8), tune2fs(8), e2fsck(8), mke2fs(8), ext4(5)

E2fsprogs version 1.46.5 – December 2021 – DEBUGFS(8)

debugfs(8)
📖 NAME 🚀 Quick Reference 🔍 SYNOPSIS 📝 DESCRIPTION ⚙️ OPTIONS 📂 SPECIFYING FILES 🛠️ COMMANDS 🌐 ENVIRONMENT VARIABLES 👤 AUTHOR 📚 SEE ALSO

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 06:52 @216.73.216.194
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^