• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

debugfs Command Examples in Linux

by Deepika

debugfs is a command line tool in Linux that can be used to interact with the ext2, ext3 and ext4 file systems. It is used to examine and modify the file system structures, and can be used for various tasks such as checking the file system consistency, checking the file system statistics, and recovering lost files.

debugfs is a powerful command-line tool and should be used with caution, as it can cause data loss if used improperly.

debugfs Command Examples

1. Open the filesystem in read only mode:

# debugfs /dev/sdXN

2. Open the filesystem in read write mode:

# debugfs -w /dev/sdXN

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

# debugfs -f path/to/cmd_file /dev/sdXN

4. View the filesystem stats in debugfs console:

# stats

5. Close the filesystem:

# close -a

6. List all available commands:

# lr

Filed Under: Linux

Some more articles you might also be interested in …

  1. bluetoothd Command Examples in Linux
  2. killall Command Examples in Linux
  3. Understanding How an Email System Works
  4. e2image Command Examples in Linux
  5. How to add a Custom Script to systemd in CentOS/RHEL 7
  6. How to grep with color output
  7. How to Change runlevels/targets using systemd in Ubuntu
  8. stress Command Examples in Linux
  9. btrfs rescue Command Examples in Linux
  10. blkdiscard: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright