• 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

e2undo Command Examples in Linux

by Deepika

The e2undo command in Linux is used to undo the last file system transaction on an ext2, ext3, or ext4 file system. This command can be used to recover from a file system error, such as an unintended deletion or modification. The e2undo command will undo the last transaction that was made by the file system and return it to its previous state.

e2undo Command Examples

1. Display information about a specific undo file:

# e2undo -h path/to/undo_file /dev/sdXN

2. Perform a dry-run and display the candidate blocks for replaying:

# e2undo -nv path/to/undo_file /dev/sdXN

3. Perform an undo operation:

# e2undo path/to/undo_file /dev/sdXN

4. Perform an undo operation and display verbose information:

# e2undo -v path/to/undo_file /dev/sdXN

5. Write the old contents of the block to an undo file before overwriting a file system block:

# e2undo -z path/to/file.e2undo path/to/undo_file /dev/sdXN

Filed Under: Linux

Some more articles you might also be interested in …

  1. lli Command Examples
  2. How to check the PHP version on Linux
  3. checkinstall Command Examples in Linux
  4. sort Command Examples in Linux
  5. “git effort” Command Examples
  6. mailq Command Examples in Linux
  7. vgextend Command Examples in Linux
  8. calc: An interactive arbitrary-precision calculator in the terminal
  9. script Command Examples in Linux
  10. How to Replace a Failed Btrfs Device

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