就在1小时前,不小心删除了linux的一个文件夹,里面有5个php文件。网上google下。
Q: How can I recover (undelete) deleted files from my ext3 partition?
Actually, you can't! This is what one of the developers, Andreas Dilger, said about it:In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas
ext2 just marks these blocks as unused in the block bitmaps and marks the inode as "deleted" and leaves the block pointers alone.
Your only hope is to "grep" for parts of your files that have been deleted and hope for the best. (出自 http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html )
开发人员都这么说了,一时找不到北。突然灵感一现,若我直接从硬盘中搜索再复制,文件不多只有5个,且都是文本文件,可能有用。我立刻从网上下了个winhex,winhex是我用到现在最好的hex文件编辑器,看了看那个硬盘文件debian.vdi,不大只有3.9G。
我想,这几个文件都是这两天新建的,那么逆向搜索应该更有效。于是回忆每个文件中的几个函数名function xxx( 逆向搜,发现了不少残本。也不管新旧,都复制过来。就这么不一会,5个文件都原原本本的找了回来。
真是有惊无险。
- RSS订阅
分类目录
- FreeBSD (3)
- Linux (26)
- archlinux (4)
- chromium (5)
- ubuntu/debian (14)
- WP使用 (3)
- WP原创插件 (1)
- 系统管理 (8)
- 编程 (55)
- C/C++ (20)
- javascript (1)
- php (1)
- PostgreSQL (7)
- ruby (19)
- 1 ruby/基础 (5)
- 2 ruby/rails (7)
- 3 ruby/c++ (5)
- 4 rubygems (1)
- 5 ruby/其它 (1)
- Vim (6)
- 版本控制 (2)
- 闲聊 (19)
- dvorak (5)
-
最近文章
近期评论
- Re: [WP插件]WP Cleaner v1.1.4
2009-07-26 v1.0.2 修正描述错误:本操作将删除所(+有)冗余修订版......(解决wordpress文章修订版和草稿箱 – 鼎逸之谷) - Re: [WP插件]WP Cleaner v1.1.4
很好用,博文推荐。...(鼎逸) - Re: [WP插件]WP Cleaner v1.1.4
下载插件 WP Cleaner(点击下载,或访问插件主页)...(cps是什么意思) - Re: Dvorak键盘布局使用总结
习惯就好 :)...(JiangMiao) - Re: Dvorak键盘布局使用总结
试了几个单词,一下子就纠结到了: this then ruby loop 看来习惯还是要花点时间啊……...(DeathKing)
- Re: [WP插件]WP Cleaner v1.1.4
小工具
功能
沙发 庆辛你没犯错
@yadandimao 是啊,自从http://www.jiangmiao.org/blog/3.html经历了硬盘坏掉的事件,我稍微注意了一下,但好了伤疤忘了痛,多数已有仓库的代码还是1天commit1次。可如果上面的5个php没找回来,我要3天的代码白写了,正改变目录结构准备建仓库中..失手了。不晓得是不是上岁数的原因,现在出错率上去不少。