Linux下利用ext3grep恢复被删除的文件
d Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 6.2G 1.8G 4.2G 30% / /dev/sda1 99M 11M 83M 12% /boot tmpfs 125M 0 125M 0% /dev/shm 确认卸载,然后使用ext3grep来恢复. [root@localhost ~]# ext3grep /dev/mapper/VolGroup00-LogVol02 --ls --inode 2 这里会创建扫描分区 [root@localhost ~]# ext3grep /dev/mapper/VolGroup00-LogVol02 --ls --inode 2 [root@localhost ~]# ext3grep /dev/mapper/VolGroup00-LogVol02 --restore-file ls Running ext3grep version 0.6.0 WARNING: I don’t know what EXT3_FEATURE_COMPAT_EXT_ATTR is. Number of groups: 8 Minimum / maximum journal block: 585 / 8787 Loading journal descriptors… sorting… done Number of descriptors in journal: 58; min / max sequence numbers: 2 / 5 Loading VolGroup00-LogVol02.ext3grep.stage2… done
Restoring ls [root@localhost ~]# ext3grep /dev/mapper/VolGroup00-LogVol02 --restore-file bin/ls Running ext3grep version 0.6.0 WARNING: I don’t know what EXT3_FEATURE_COMPAT_EXT_ATTR is. Number of groups: 8 Minimum / maximum journal block: 585 / 8787 Loading journal descriptors… sorting… done Number of descriptors in journal: 58; min / max sequence numbers: 2 / 5 Loading VolGroup00-LogVol02.ext3grep.stage2… done Restoring bin/ls [root@localhost ~]# ls -la RESTORED_FILES/ total 124 drwxr-xr-x 3 root root 4096 Apr 21 18:01 . drwxr-x— 5 root root 4096 Apr 21 17:55 .. -rwxr-xr-x 1 root root 93560 Apr 21 17:48 ls [root@localhost ~]# ext3grep /dev/mapper/VolGroup00-LogVol02 --restore-file bin/zcat Running ext3grep version 0.6.0 WARNING: I don’t know what EXT3_FEATURE_COMPAT_EXT_ATTR is. Number of groups: 8 Minimum / maximum journal block: 585 / 8787 Loading journal descriptors… sorting… done Number of descriptors in journal: 58; min / max sequence numbers: 2 / 5 Loading VolGroup00-LogVol02.ext3grep.stage2… done Restoring bin/zcat [root@localhost ~]# ls -la RESTORED_FILES/bin/ total 188 drwxr-xr-x 2 root root 4096 Apr 21 18:01 . drwxr-xr-x 3 root root 4096 Apr 21 18:01 .. -rwxr-xr-x 1 root root 62136 Apr 21 17:48 zcat 看看都恢复在RESTORED_FILES目录下,大小也一样,这里RESTORED_FILES目录是执行ext3grep的当前目录下! 也可以使用: ext3grep /termite/cc-disk --restore-all 恢复所有文件和目录,但是目录的话,如果删除时间较长,不一定能完全恢复,压缩文件一般都能恢复. 如果想详细的了解ext3grep,可以到它的的HOW TO页去看看: http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html 1、删除/root/shell/hehe下的a文件 2、安装ext3grep-0.10.1.tar.gz ext3grep命令已经可以正常使用 3、ext3grep /dev/sda3 --ls --inode 2 创建扫描分区(不明白这步有什么用,请高手指点)
4、ext3grep /dev/sda3 --restore-file root/shell/hehe/a 恢复文件a 5、ext3grep /dev/sda3 --restore-inode 75631 根基inode
|
|||
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |