1.下載下傳ext3grep :http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz
2.編譯安裝 ./configure make make install ext3grep 是否有資訊
3.e2fsprogs的安裝 rpm-qa|grep e2fsprogs
1、先安裝ext3grep軟體:
tar zxvf ext3grep-0.10.1.tar.gz
cd ext3grep-0.10.1
./configure
make
make install
2、umount /data0分區:
umount /data0
如果提示busy,先kill正在使用這個目錄的程序,再umount:
fuser -k /data0
3、查詢所有Inode,(執行需要幾分鐘~十多分鐘):
ext3grep /dev/sdb1 --ls --inode 2

4、逐級查找Inode,看是否能找到httpcws.cpp檔案(此步驟也可省略):
<a></a>
5、恢複/data0/tcsql/cankao/phpcws-1.5.0/httpcws.cpp檔案:
ext3grep /dev/sdb1 --restore-file tcsql/cankao/phpcws-1.5.0/httpcws.cpp
如果提示以下資訊,則表示恢複成功:
Restoring tcsql/cankao/phpcws-1.5.0/httpcws.cpp
這時,執行ext3grep指令的目前目錄下将會自動生成一個名為RESTORED_FILES的檔案夾,檔案夾下的tcsql/cankao/phpcws-1.5.0/httpcws.cpp即為恢複的檔案。檢視了一下,和被删除前的内容一樣,大功告成。
6、重新mount /data0分區:
mount /dev/sdb1 /data0
本文轉自東方之子736651CTO部落格,原文連結:http://blog.51cto.com/ecloud/1381149 ,如需轉載請自行聯系原作者