Contents
To recover files run testdisk /dev/sdX and select your partition table type. After this, select [ Advanced ] Filesystem Utils , then choose your partition and select [Undelete] . Now you can browse and select deleted files and copy them to another location in your filesystem.
How can I recover deleted files in Linux?
1. Unmounting:
- At 1st Shut down the system, and do the recovery process by booting from a Live CD/USB.
- Search the partition that contains the file you deleted, for example- /dev/sda1.
- Recover the file (make sure you have enough space)
How do I undo an accidentally deleted file?
While you accidentally deleted a file or folder on the computer hard disk drive, you can retrieve the files back by click “Ctrl+Z”. Or you can right-click on the location it will pop-up a list option and click “Undo Delete” to get your files back.