In GNU/Linux. Ubuntu Jaunty. I did something stupid, where is the undo command?
|
migrated from stackoverflow.com Apr 18 '10 at 22:14
|
There is no "undo" option. Find a data recovery program and don't write anything to disk to avoid overwriting the files. |
|||||||||
|
|
I found this page a while ago and (fortunately) haven't needed to use it. It's a bit verbose but apparently there is a way to undelete files from the ext3 filesystem (standard on jaunty). |
|||
|
|
|
First things first! Boot into single user mode and remount the drive in question read-only. This will pervent any further damage you might cause. When you do that, the crisis is averted and you can use any one of a number of methods to undelete. None of them is guaranteed to work, as your sources are marked as deleted on the filesystem, and Linux may have overwritten them with something else already. I did do that once. I deleted an entire project that had no recent backup. And the undelete tool I tried wasn't able to discovered the deleted files. Cue many hours of panicked scrolling through a many-GB HDD image in PICO. I kept pagedown and looked for something that isn't gibberish. Eventually I reached my project files which were almost intact and thankfully were residing nearby each other on the HDD image. |
|||
|
|
|
After rebooting to single user mode and remounting the drive to read only you can grep the entire /dev/sdXX for the file headers or anything else you know was in the file. This is basically what all ext3 file undeletion programs do. |
|||
|
|
|
If you did this command in your Console application, there is no way to undo what you just did. Sorry! :( |
|||
|
|