Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

One of my friends was working on a 10 page college paper, and saved it in the tmp folder of ubuntu. The file is listed under LibreOffice Writer's "recent files" but when clicked on, it comes up with an error that says "this file does not exits." I am guessing that the problem is that all tmp files are deleted to save space, but I was wondering if there was a way to restore it.

share|improve this question
    
Was the file under /tmp? If so, it was probably deleted when the system rebooted. –  Mark Johnson Jan 15 '12 at 17:27
add comment

1 Answer

If the file you're after has been deleted, the blocks that the data is stored on are in danger of being overwritten. Once that happens, you're not getting it back.

Ideally, you'd remount the partition the file was on read only immediately to prevent that. Check this guide.

If remounting is not an option, you probably want to consider shutting the system down. That will generate disk write activity that could kill the file, but so will leaving the system up long enough, even if nobody is logged in.

Once you've got the system shut down, you can boot it off a USB drive or optical media and try and recover the file. Something with extundelete on it would be ideal. Check out the Ubuntu Rescue Remix.

Even if you can't get the whole file back, you might get some text fragments back by grepping the raw device file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.