debugfs
The debugfs program is an interactive file system debugger. It can be used to examine and change the state of an ext2/ext3/ext4 file system.[1]
Documentation
- man 8 'debugfs' [EN]
Syntax
debugfs [PARAMETER ...] [DEVICE]
Parameters
- -w
- Specifies that the file system should be opened in read-write mode. Without this option, the file system is opened in read-only mode.
Commands
- freeb BLOCK [COUNT]
- Mark the BLOCK number block as not allocated. If the optional argument COUNT is present, then count blocks starting at block number block will be marked as not allocated.
- ls [-l] [-d] DIRECTORY
- Print a listing of the files in the DIRECTORY. The -l flag will list files using a more verbose format. The -d flag will list deleted entries in the directory.
- stat INODE
- Display the contents of the inode structure of the INODE.
- undel INODE [PATH]
- Undelete the specified INODE number (which must be surrounded by angle brackets) so that it and its blocks are marked in use, and optionally link the recovered inode to the specified PATH. The e2fsck command should always be run after using the undel command to recover deleted files.
- help
- Print a list of commands understood by debugfs.
References
- ↑ man 8 'debugfs'