Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 12.10 and was using guest account. I downloaded some files on desktop and shutdown my m/c after use. Now today when I logged in to guest account to copy those files but surprisingly those files were gone and desktop was clear. I guess ubuntu deletes all files from guest account on shutdown.

Can you please guide me to recover those lost files.

Thanks

share|improve this question
    
Yes, ubuntu deletes all files from the guest account on reboot, and i dont think that there is any easy way to recover those –  Sam Dec 3 '12 at 3:27
    
This is how Ubuntu guest account works, so that one get cannot see what the other guest downloaded. if you use the guest account, copy the files you need in an USB drive before you log off. –  user68186 Dec 3 '12 at 3:27
1  
Actually I didn't knew about this fact. I will keep it in mind or better I will disable guest account. –  Sandy Dec 3 '12 at 7:12

2 Answers 2

up vote 10 down vote accepted

Ubuntu's Guest account is a special type of account, which has its home directory set to the mount point of a tmpfs filesystem, which is used to store data which does not need to be persisted after a reboot.

The data in tmpfs is stored in RAM backed up by the swap space, so it is likely the data had never been written to disk in the first place, so there's basically nothing to recover.

More details on tmpfs.

If you're curious how guest account is set up, you can study /usr/sbin/guest-account, which is a shell script used to create/remove a guest account.

share|improve this answer
    
I will keep these points in mind. Thanks –  Sandy Dec 3 '12 at 7:14

Try TestDisk:

sudo apt-get install testdisk

It's an all purpose filesystem recovery tool. To recover deleted files do this:

  1. Open TestDisk in terminal as root:

    sudo testdisk
    
  2. Select the HDD that contains your Ubuntu Partition

  3. Select your Partition Tabel format(Usually Intel but may be EFI on 2TB+ HDDs)

  4. Select "Analyse-->Quick Search"

  5. Once it finishes scanning select your Ubuntu Partition and then press P

  6. Browse to the Home Folder and see if you can find the deleted files and if so use c to copy them to a safe location

  7. Now press q continuously to leave TestDisk safely.

EDIT: I just retried this and it doesn't seem TestDisk can find deleted folders, I'll double check though.

share|improve this answer
    
Sergey has reminded me that the Guest account is not stored on Disk so recovery by any means, even my above method, will most likely not work. Sorry. –  japzone Dec 3 '12 at 4:09

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.