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


    下载地址:

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

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

    下面演示软件使用方法:

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

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

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

    接下来查看这个分区上所有的文件/目录及其对应的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

  • 相关阅读:
    (转)Java 调用 C++ (Java 调用 dll)
    用Gvim建立IDE编程环境 (Windows篇)
    (转)python调取C/C++的dll生成方法
    C/C++协程的实现方式总结
    时钟周期,机器周期,指令周期,总线周期
    (转)MongoDB和Redis区别
    linux cpu占用100%排查
    (转)linux 打开文件数 too many open files 解决方法
    Python下载网页图片
    python抓网页数据【ref:http://www.1point3acres.com/bbs/thread-83337-1-1.html】
  • 原文地址:https://www.cnblogs.com/txwsqk/p/2053975.html
Copyright © 2020-2023  润新知