We were working on writing a paper while logged into an Ubuntu guest account. The paper was saved in the guest account's home directory. The computer froze, so we restarted. Ubuntu purged the files. Is it possible to recover?
4 Answers
It is not true that there is no way to recover them. It is true that there is no particularly reliable way to recover them. And with all the time that has passed, it is quite unlikely they could be recovered now; I'm really posting this answer for others who experience similar situations in the future.
When a file is deleted, such as files purged from /tmp, the data is not immediately destroyed, and it can persist for an extended time, and it can sometimes be recovered. See https://help.ubuntu.com/community/DataRecovery for information about data recovery in the context of Ubuntu.
Continuing to use your computer after you have deleted files that you want to recover significantly decreases the chance that recovery will be possible. So please do heed this warning (from DataRecovery):
You should NOT write to the failed device, as it can worsen a hardware failure, and overwrite existant data in case of lost files.
Shut down the affected machine as soon as possible, and restart it from a LiveCD or LiveUSB. Be certain that the "live" cd does not automatically mount any partition or swap space.
In other words, stop using the Ubuntu system immediately, and only boot into either (1) a different system installed on the computer, or (2) better, a live CD/DVD or live USB flash drive.
(Thanks to Joseph Kern for pointing out the importance of emphasizing the need to stop using the system if there is to be good chance of recovering deleted files.)

- 117,780
-
1You should add that they need to stop using the computer right now if they want a chance at recovery. – Oct 29 '11 at 15:54
The first thing to do is to stop using the filesystem immediately, as every write will reduce the chance of recovering files.
I would recommend looking at using ExtUndelete as I have heard good things about it. I noticed that is it now packaged for Oneiric so booting a liveCD and installing it should not be an issue.

- 8,557
first of all the GUEST account of Ubuntu is NOT like Windows Guest account. Every time you use a guest account the Ubuntu creates a temporary user in the /tmp directory.ALL THE WORK DONE IN THIS ACCOUNT IS DELETED as soon AS THIS Account is LOGGED of.
You should visit this link https://help.ubuntu.com/community/DataRecovery for further details

- 3,591
Based on the clarification given by andol, since all the files were located in /tmp which was purged, there is no way to recover them.

- 1,100
-
2Not technically true. /tmp is not formatted on reboot. Recovery is still possible through testdisk, foremost, etc. It just depends on how much time you can spend on recovery. – Oct 29 '11 at 15:53
lost+found
directory? – Dec 15 '09 at 03:43As a side note: I guess you should tell people using guests account that they should use online services when creating documents with such accounts (Google Docs or so).
– raphink Dec 17 '09 at 16:41