Ubuntu deleted files from guest account desktop
Solution 1
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.
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.
Solution 2
Try TestDisk:
sudo apt-get install testdisk
It's an all purpose filesystem recovery tool. To recover deleted files do this:
-
Open TestDisk in terminal as root:
sudo testdisk
Select the HDD that contains your Ubuntu Partition
Select your Partition Tabel format(Usually Intel but may be EFI on 2TB+ HDDs)
Select "Analyse-->Quick Search"
Once it finishes scanning select your Ubuntu Partition and then press
P
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 locationNow 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.
Related videos on Youtube
Sandy
Updated on September 18, 2022Comments
-
Sandy over 1 year
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
-
Sam over 11 yearsYes, ubuntu deletes all files from the guest account on reboot, and i dont think that there is any easy way to recover those
-
user68186 over 11 yearsThis 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.
-
Sandy over 11 yearsActually I didn't knew about this fact. I will keep it in mind or better I will disable guest account.
-
-
japzone over 11 yearsSergey 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.