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.

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.

Solution 2:

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.