• 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. ghost Command Examples in Linux
  2. How to work with multiple java versions under Linux
  3. cp: omitting directory – error while copying a directory in Linux
  4. chage Command Examples in Linux
  5. blackfire: A command-line profiling tool for PHP (Command Examples)
  6. mdbook Command Examples in Linux
  7. reboot: command not found
  8. How systemd-tmpfiles cleans up /tmp/ or /var/tmp (replacement of tmpwatch) in CentOS / RHEL 7
  9. setsebool: command not found
  10. apt-add-repository: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “glab pipeline” Command Examples
  • “glab mr” Command Examples
  • “glab mr merge” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright