You might be wondering "Well, I accidentally deleted this file, how can I recover it?". Don't fear, there are some utilities designed for GNU/Linux's ext2 file system which allow you to recover deleted files and directories. However, these utilities won't recover the files you deleted a few months ago because of disk usage, space marked as "free" will be overwritten; so the best way to protect against accidental or not so accidental deletions is doing backups as described above.
![]() | Please bear in mind that there are not (as yet) tools to recover files deleted on ReiserFS file systems. Keep in touch with the ReiserFS homepage for the latest news about ReiserFS. |
Anyway, on to the tools for recovering your deleted files. One such tool is Recover. It is an "interactive" tool. If you are the proud owner of a Mandrake Linux - PowerPack Deluxe Edition, you already have this tool in the "contribs" CD-ROM. Otherwise, you can find it on the RPMFind web site. Go there and download the RPM. Once you have the RPM, install it. Then, run it with recover [command_line_opts] and answer the questions it asks you. The questions are for setting a time span to look for deleted files and directories to minimize the time it takes to do the search.[1]
Once the tool finishes its search, it will ask you where you want to save the recovered files and directories. Pick a directory of your choice, and you will have all the files and directories recovered in it. Note that you will not be able to recover the filenames, just their contents, but you can inspect them or try to rename them with different names until you get the right one. This is better than nothing.
![]() | There are also mini-HOWTOs related to undeletion for ext2, look at Ext2fs-Undeletion and undeletion of whole directory structures. |
[1] | You can search for all deleted files too, but it will take longer... |