另一种方法是手工编辑inode: debugfs:mi <196829> Mode [0100644] User ID [0] Group ID [0] Size [149500] Creation time [0x31a9a574] Modification time [0x31a9a574] Access time [0x31a21dd1] Deletion time [0x31a9a574] 0 Link count [0] 1 Block count [38] File flags [0x0] Reserved1 [0] File acl [0] Directory acl [0] Fragment address [0] Fragment number [0] Fragment size [0] Direct Block #0 [594810] ……………………………. Triple Indirect Block [0] 使用mi指令后每次显示一行信息以供编辑,其它行可以直接按回车表示确认,把deletion time改成0(未删除),Link count改成1。改好后退出debugfs: debugfs:quit
然后用fsck检查/dev/hda5 fsck /dev/hda5 程序会说找到丢失的数据块,放在lost+found里面。这个目录里的文件就是我们要的东东。 Now all O.K. Good Luck.