

You may find many other software like PhotoRec but it is way easier to use to recover the media files and documents. In this article, we learn to recover deleted files or lost files using PhotoRec in Ubuntu. You may notice some other files also being recovered and file names also being changed as the PhotoRec the name according to its algorithm. Once recovery is completed you will see the following output.Īll the recovered files will be saved inside the directory called recup_dir under the directory you set up before beginning the recovery. Now, select the directory where the recovered file will be saved then hit c to proceed with the recovery. If you select Free, only the chosen partition disk’s unallocated space will be scanned and if you choose Whole all allocated partitions will be scanned. Now, select the portion of the space to be analyzed. Next, select your filesystem type where the file will be stored and hit enter. You can select the partition using the up and down arrow key and hit enter to the search. It is compatible with multiple file systems-NTFS, FAT12, FAT16, FAT32, exFAT. You can select File Opt and filter files according to the selected extension only. Testdesk can recover files, folders, images, Microsoft documents, and even videos.

Then, you will see the following interface where you are requested to select the partition. Now, once the disk is selected, select proceed using the left and right key then hit enter. On command execution, you will see the following interface where you can select your disk. PhotoRec can be launched using the following command.

As you can see in the following example I have deleted some of the images and we will be recovering these files. Once installation completes you can now perform the recovery task.
#Testdisk photo recover install
$ sudo apt update $ sudo apt install testdisk -y So, to install TestDisk execute the following command. PhotoRec doesn’t have it’s own package but it will come with the package while installing the TestDisk package. In this article, we will install and use PhotoRec to recover deleted files in ubuntu 20.04 LTS. When you accidentally deleted the file you better not add more media or document files to that memory or hard drive as you might overwrite your lost data. We type the following to make sure the correct ownership has been restored: ls -l. We can change the owner back to dave using chown: sudo chown dave.dave. It supports and can recover more than 480 file extensions. Because we used sudo to launch testdisk, the recovered files have been restored with root as the owner. The TestDisk is used to recover deleted partitions and make non-bootable disks bootable again and photoRec recovers deleted media files or document files. PhotoRec is an open-source software utility to recover lost or deleted media files like photos, videos, documents, etc from CD-ROMs, Hard disks, and digital camera memory.
