Linux下恢复ext3文件系统误删除文件--ext3grep

下载地址:

http://code.google.com/p/ext3grep/downloads/list

软件安装方法就是最简单的: ./configure && make && make install 

下面演示软件使用方法:

首先卸载要恢复的文件所在的分区

文件恢复后保存在当前目录的 RESTORED_FILES 内

Linux下恢复ext3文件系统误删除文件--ext3grep_第1张图片

用/boot分区演示,先卸载/boot

Linux下恢复ext3文件系统误删除文件--ext3grep_第2张图片

接下来查看这个分区上所有的文件/目录及其对应的inode

[root@x1 ~]# ext3grep /dev/sda1 --ls --inode 2

Running ext3grep version 0.10.2
WARNING: I don't know what EXT3_FEATURE_COMPAT_EXT_ATTR is.
Number of groups: 13
Loading group metadata... done
Minimum / maximum journal block: 526 / 4640
Loading journal descriptors... sorting... done
The oldest inode block that is still in the journal, appears to be from 1301588392 = Fri Apr  1 00:19:52 2011
Number of descriptors in journal: 88; min / max sequence numbers: 9 / 33
Inode is Allocated
Loading sda1.ext3grep.stage2... done
The first block of the directory is 512.
Inode 2 is directory "".
Directory block 512:
          .-- File type in dir_entry (r=regular file, d=directory, l=symlink)
          |          .-- D: Deleted ; R: Reallocated
Indx Next |  Inode   | Deletion time                        Mode        File name
==========+==========+----------------data-from-inode------+-----------+=========
   0    1 d       2                                         drwxr-xr-x  .
   1    2 d       2                                         drwxr-xr-x  ..
   2    3 d      11                                         drwx------  lost+found
   3    5 d    2009                                         drwxr-xr-x  grub
   4    5 d    8033  D 1306070584 Sun May 22 21:23:04 2011  drwxr-xr-x  ext3grep-0.10.2
   5    6 r      12                                         rrw-r--r--  message
   6    7 r      18                                         rrw-------  initrd-2.6.18-194.el5.img
   7    8 r      13                                         rrw-r--r--  .vmlinuz-2.6.18-194.el5.hmac
   8    9 r      14                                         rrw-r--r--  System.map-2.6.18-194.el5
   9   10 r      15                                         rrw-r--r--  config-2.6.18-194.el5
  10   11 r      16                                         rrw-r--r--  symvers-2.6.18-194.el5.gz
  11  end r      17                                         rrw-r--r--  vmlinuz-2.6.18-194.el5
  12  end r      19  D 1306070584 Sun May 22 21:23:04 2011  rrw-r--r--  ext3grep-0.10.2.tar.gz

ps: --ls参数表示按行列出与ls命令类似;--inode 2表示从根目录开始查询inode

恢复文件ext3grep-0.10.2.tar.gz

Linux下恢复ext3文件系统误删除文件--ext3grep_第3张图片

你可能感兴趣的:(linux)