O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

debugfs

Synopsis

                  debugfs [[option] device]

System administration command. Provide direct access to data structure of an ext2 filesystem in order to debug problems with the device. device is the special file corresponding to the device containing the ext2 filesystem (e.g., /dev/hda3). debugfs may be used on a mounted filesystem device.

Option

-b blocksize

Use the specified blocksize for the filesystem.

-c

Catastrophic mode. Open the filesystem in read-only mode, do not read the inode and group bitmaps initially.

-f file

Read commands from file. Exit when done executing commands.

-i

Specify file system device is an ext2 image file created by e2image.

-s block

Read the superblock from the specified block.

-w

Open the filesystem in read-write mode.

-R command

Execute the given command (see list below) then exit.

-V

Print version number, then exit.

Commands

cat file

Dump the contents of an inode to standard output.

cd directory

Change the current working directory to directory.

chroot directory

Change the root directory to be the specified inode.

close

Close the currently open filesystem.

clri file

Clear the contents of the inode corresponding to file.

dump file out_file

Dump the contents of an inode to out_file.

expand_dir directory

Expand directory.

feature [[-]feature]

Set filesystem feature listed on the command line, then print current feature settings. Use - to clear a feature.

find_free_block [goal]

Find first free block starting from goal (if specified) and allocate it.

find_free_inode ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required