Recover Delete files and folder on Linux/Ubuntu 14 | Recover files with PhotoRec

How to recover files with PhotoRec recovery software on Ubuntu:

PhotoRec is a recovery software which can can of course recover files other than images, such as videos, text files, etc..When you delete a file from your disk, it is as if you were cutting the link only allowed to access this file. If you went straight to disk, the file would be found intact. Beware though, the file remains “recoverable” when the operating system does not rewrite new data on its location. So do not expect to find very old files!

 Installation of PhotoRec on ubuntu:

PhotoRec is a software, normally used for recorving the image and media files. Installation of PhotoRec is very simple and easy, open the terminal by pressing the Ctrl+Alt+t and run the following command:

sudo apt-get install testdisk

This will automatically install this software.

To launch the PhotoRec, open terminal and run the command:

sudo photorec

Once the program is open, the following will appears:

photoRec on ubuntu 14

Simply select the hard disk where you want to recover the deleted files:

recover software ubuntu

Once you select the disk, Photorec will ask you about the partition type:

recover files on ubuntu

Choose your desire partition and file-types:select the file type

PhotoRec asks you if it should then search for files only in the free hard disk space or if it is necessary to search the entire disk for missing files.

Normally, you have less possibility against lost in a busy area of hard disk. To speed up the search, you can leave the research carried out in the free areas. So I am also selecting “Free”

select the space for alalysed for recovery ubuntu

After this photoRec will ask you for selecting the destination directory for lost files from given list:

destination for recovery Ubuntu


PhotoRec will then ask you which directory it should place the recovered files. Select the folder you want and press Y to confirm.

PhotoRec then search for deleted or file type (s) selected.

recover files on ubuntu 14

Once the process is completed. goto directory that you have selected above and find the recovered files and folders.




Waqas Azam
Me Waqas Azam and I am a professional blogger & freelance writer. I also working in the IT industry for over 7 years. I am graduated in Computer Science and information technology.