• 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

e2image Command Examples in Linux

by Deepika

The e2image command in Linux is used to create an image of an ext2, ext3, or ext4 file system. This image can be used for backup or recovery purposes. The command creates a file that contains a copy of the file system’s data, which can be restored to a disk or partition using the e2image command.

e2image Command Examples

1. Write metadata located on device to a specific file:

# e2image /dev/sdXN path/to/image_file

2. Print metadata located on device to stdout:

# e2image /dev/sdXN -

3. Restore the filesystem metadata back to the device:

# e2image -I /dev/sdXN path/to/image_file

4. Create a large raw sparse file with metadata at proper offsets:

# e2image -r /dev/sdXN path/to/image_file

5. Create a QCOW2 image file instead of a normal or raw image file:

# e2image -Q /dev/sdXN path/to/image_file

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to remove used Physical Volume(PV) from Volume Group (VG) in LVM
  2. How to uninstall local-apt-repository software package in Ubuntu
  3. How to Install and configure telnet in RHEL / CentOS 5,6
  4. Installation Steps of jEdit on Ubuntu Linux
  5. sxiv Command Examples in Linux
  6. How To Customize The Screensaver Options In Gnome on CentOS/RHEL 7
  7. powertop: command not found
  8. exec Command Examples in Linux
  9. duperemove: command not found
  10. CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image

You May Also Like

Primary Sidebar

Recent Posts

  • batch: Execute commands at a later time when the system load levels permit
  • bat: Print and concatenate files
  • bastet: Clone of the game Tetris in the terminal
  • bashmarks: Save and jump to commonly used directories using 1 character commands

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright