一、安装数据恢复软件extundelete
1、安装必要依赖包e2fsprogse2fsprogs-libs
[root@localhost~]# yum -y install e2fsprogs e2fsprogs-libs
2、下载extundelete,地址https://sourceforge.net/projects/extundelete/files/latest/download
3、安装报错解决
[root@localhost~]# tar jxvf extundelete-0.2.4.tar.bz2
[root@localhost~]# cd extundelete-0.2.4/
[root@localhostextundelete-0.2.4]# ./configure
Configuringextundelete 0.2.4
configure:error: Can't find ext2fs library
configure时报错,未找到ext2fslibrary,安装e2fsprogs-libs-devel即可
[root@localhostextundelete-0.2.4]# yum install e2fsprogs-libs-devel
……
Installed:
e2fsprogs-devel.x86_640:1.41.12-22.el6
Complete!
4、重新编译安装extundelete
[root@localhostextundelete-0.2.4]# ./configure
Configuringextundelete 0.2.4
Writinggenerated files to disk
[root@localhostextundelete-0.2.4]# make
make-s all-recursive
Makingall in src
extundelete.cc:571:警告:未使用的参数‘flags’
[root@localhostextundelete-0.2.4]# make install
Makinginstall in src
/usr/bin/install-c extundelete '/usr/local/bin'
[root@localhostextundelete-0.2.4]#
二、extundelete用法详解:
[root@localhost/]# extundelete --help
Usage:extundelete [options] [--] device-file
Options:
--version,-[vV] 显示软件版本号Printversion and exit successfully.
--help, 显示软件帮助信息Printthis help and exit successfully.
--superblock 显示超级块信息Printcontents of superblock in addition to the rest.Ifno action is specified then this option is implied.
--journal 显示日志信息Showcontent of journal.
--afterdtime 时间参数,表示在某段时间之后被删除的数据Onlyprocess entries deleted on or after 'dtime'.
--beforedtime 时间参数,表示在某段时间之前被删除的数据Onlyprocess entries deleted before 'dtime'.
Actions动作有:
--inodeino 显示节点'ino'信息Showinfo on inode 'ino'.
--blockblk 显示数据块'blk'信息Showinfo on block 'blk'.
--restore-inodeino[,ino,...] 恢复命令参数,表示恢复节点“ino”的文件,恢复的文件会自动放在当前
目录下的RECOVERED_FILES文件夹中,使用节点编号作为扩展名
Restorethe file(s) with known inode number 'ino'.Therestored files are created in ./RECOVERED_FILESwiththeir ino