DEBUGFS(8)

NAME
debugfs - ext2 file system debugger

SYNOPSIS
debugfs [ [ -w ] device ]

DESCRIPTION
debugfs is a file system debugger. It can be used to examine and change the state of an ext2 file system.
device is the special file corresponding to the device containing the ext2 file system (e.g /dev/hdXX).

OPTIONS

-w  Specify that the file system should be open in read-write mode. Without this option, the file system is open in read-only mode.

COMMANDS
debugfs is an interactive debugger. It understands a number of commands.

cd file

chroot file

close
    Close the currently open file system.

clri file
    Clear the contents of the inode corresponding to file

expand_dir, file
    Expand a directory.

find_free_block [goal]
    Find the first free block, starting from goal and allocates it.

find_free_inode [dir [mode]]
    Find a free inode and allocates it.

freeb block
    Mark the block as not allocated.

freei file
    Free the inode corresponding to file

help

iname inode
    Print the file name corresponding to inode (currently not implemented).

initialize device blocksize
    Create an ext2 file system on device

kill_file file
    Remove a file and deallocates its blocks.

ln source_file dest_file
    Create a link.

ls [pathname]
    Emulate the ls(1) command.

modify_inode file
    Modify the contents of the inode corresponding to file

mkdir file
    Make a directory.

open [-w] device
    Open a file system.

pwd

quit
    Quit debugfs

rm file
    Remove a file.

rmdir file
    Remove a directory.

setb block
    Mark the block as allocated.

seti file
    Mark in use the inode corresponding to file

show_super_stats
    List the contents of the super block.

stat file
    Dump the contents of the inode corresponding to file

testb block
    Test if the block is marked as allocated.

testi file
    Test if the inode correponding to file is marked as allocated.

unlink file
    Remove a link.

AUTHOR
debugfs has been written by Theodore T'so <tytso@mit.edu>.

SEE ALSO
dumpe2fs(8), e2fsck(8), mke2fs(8)