I recently accidentally deleted a file from a shared partition (I have a dual boot system). However, I only find the recycle bin of Windows on the shared partition, but no recycle bin of Ubuntu. In the normal trash folder of Ubuntu there are only the files deleted from the Ubuntu partition, not from the shared one which has the mount point /media/storage
.
How can I recover the file that I deleted?
Thanks for your help!!
Output of lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 100M 0 part
├─sda2 8:2 0 58.5G 0 part /media/lena/AA68798068794BD7
├─sda3 8:3 0 175.8G 0 part /media/storage
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 56G 0 part /
└─sda6 8:6 0 7.7G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
Best Answer
Files "deleted" in other partitions should be temporarily be moved in a
.Trash-1000
folder within the same partition they were "deleted" from while pending a "definitive deletion"; this is a hidden folder, so try the following:Files
.Trash-1000
folder and browse its contentThe "deleted" file should be somewhere inside this folder.
If it's not, you can try to recover it with
testdisk
:Terminal
by hitting Ctrl+Alt+ttestdisk
:sudo apt-get install testdisk
sudo testdisk
No Log
Proceed
Analyse
Quick Search
.Trash-1000
folder and see if your file is listed in red; if it is, select it and hit ctestdisk
This should recover the deleted file and copy it in the location specified, altough the file might have been overwritten (and be corrupted) since his deletion from the filesystem entries.