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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. Linux OS Service ‘named’
  2. extundelete: command not found
  3. How to Install and configure telnet in RHEL / CentOS 5,6
  4. glab Command Examples
  5. rofi Command Examples in Linux
  6. copyq: Clipboard manager with advanced features
  7. Understanding rsyslog Templates
  8. fastlane: Build and release mobile applications from the command-line.
  9. hlint Command Examples in Linux
  10. jpegtran: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright