1

In GNU/Linux. Ubuntu Jaunty. I did something stupid, where is the undo command?

2
  • 11
    go back in time and create a source code repository that you conscientiously check in all your revisions to.
    – intuited
    Apr 18, 2010 at 23:16
  • 1
    Ubuntu is NOT UNIX :)
    – Tim Post
    Apr 20, 2010 at 12:20

5 Answers 5

4

There is no "undo" option. Find a data recovery program and don't write anything to disk to avoid overwriting the files.

2
  • 1
    +1, but even just firing up a browser to search for one is likely wiping out at least a few of them :)
    – Tim Post
    Apr 20, 2010 at 12:21
  • 1
    @Tim I wouldn't say it is likely to wipe out a few of them, unless the drive is completely at capacity. The possibility is very real though.
    – Goyuix
    Apr 20, 2010 at 14:43
3

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).

http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html

0

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.

0

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.

0

If you did this command in your Console application, there is no way to undo what you just did. Sorry! :(

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .