首页 > 其他 > 详细

extundelete工具恢复误删文件

时间:2016-02-15 16:42:37      阅读:295      评论:0      收藏:0      [点我收藏+]

1.安装依赖包(e2fsprogs,e2fsprogs-libs,e2fsprogs-devel)

# yum -y install e2fsprogs* 


2.下载并安装extundelete-0.2.4.tar.bz2

# wget http://nchc.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2  
# tar -jxvf extundelete-0.2.4.tar.bz2 
# cd extundelete-0.2.4 
# ./configure --prefix=/usr/local/extundelete 
# make && make install


3.验证是否安装成功 
# cd /usr/local/extundelete/bin 
# ./extundelete -v 
----------------------------------------------------------------------
extundelete version 0.2.4
libext2fs version 1.41.12
Processor is little endian.
----------------------------------------------------------------------


4.设置环境变量
# echo "PATH=/usr/local/extundelete/bin:$PATH" >> /etc/profile
# echo "export PATH" >> /etc/profile
# source /etc/profile


5.使用一个新磁盘分区做测试

# mount /dev/sdb1 /mnt

# cp /etc/grub.conf ./

# rm -rf ./*

# cd /data

# umount /mnt


6.查看被删除的文件

# extundelete /dev/sdb1 --inode 2


7.一次性恢复所有文件

# extundelete /dev/sdb1 --restore-all


8.查看文件是否恢复成功(默认被删文件会恢复到当前目录下的RECOVERED_FILES目录中去)

# ls -al /data/RECOVERED_FILES/


PS:其他的参数可以自己去 extundelete --help 查看。。。。。







本文出自 “珞辰的博客” 博客,请务必保留此出处http://luochen2015.blog.51cto.com/9772274/1742081

extundelete工具恢复误删文件

原文:http://luochen2015.blog.51cto.com/9772274/1742081

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!