一、删除文件后有点担心不能恢复,现在不用怕了,有这个工具就可以了,很好用的
1,下载工具
[root@44 ~]# wget http://ext3grep.googlecode.com/files/ext3grep-0.6.0.tar.gz
2,安装
先检查下这三个包是否已经安装,没有的话先安装下,检查有没有安装gcc c++工具是否安装
[root@44 ~]# rpm -qa |grep e2fs
e2fsprogs-devel-1.39-23.el5
e2fsprogs-libs-1.39-23.el5
e2fsprogs-1.39-23.el5
[root@44 ~]#yum install c++* -y
3,安装
[root@44 ~]# tar xzvf ext3grep-0.6.0.tar.gz
[root@44 ~]# cd ext3grep-0.6.0
[root@44 ext3grep-0.6.0]# ./configure ; make ; make install
4,编译安装完成后就可以使用这个工具了
[root@44 ext3grep-0.10.1]# ext3grep -v
Running ext3grep version 0.6.0
ext3grep v0.10.1, Copyright (C) 2008 Carlo Wood.
ext3grep comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.
5,下面测试下恢复效果
[root@44 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 47G 2.3G 43G 6% /
/dev/sda3 487M 11M 451M 3% /home
/dev/sda1 190M 12M 169M 7% /boot
tmpfs 125M 0 125M 0% /dev/shm
/dev/sdb9 on /mnt type ext3 (rw)
6,使用/dev/sdb9来做测试
[root@44 ~]# cd /mnt
[root@44 mnt]# cp /etc/dhcp6c.conf .
[root@44 mnt]# cp -r /etc/yum.repos.d .
[root@44 mnt]# ll
total 14
-rw-r--r-- 1 root root 178 Jan 22 23:58 dhcp6c.conf
drwx------ 2