

To install TestDisk, enable the EPEL repository and follow the installation instructions. $ sudo dpkg -l testdisk Install TestDisk on RHEL and CentOS Execute the dpkg command to verify that Testdisk is installed and to show more details. To begin, update the system packages and install TestDisk as directed. When you’re done with recovery, press q to quit.Most Linux distributions have the package TestDisk available for installation from the default system repositories using the default package manager, as seen below. If you want to recover all the data in a directory, press a to select all the files and then Shift + c to copy all the selected files to your destination directory, then provide destination directory, and press c to begin copy. You will be asked to provide destination location where you want to save this deleted file, go there and press c to begin copy. Select a partition you want to recover, and navigate to Undelete form the bottom of the screen and select it.įound what you were looking for? Navigate to your deleted file or directory and press c.

You will see a partition table for your device.

TestDisk will suggest you the partition table type of your drive, select it. Now, select device you want to recover, and then Proceed. This will create a log file for further inspection purpose. Select Create using arrow keys and press enter. Recoveryīe sure to run it with root privileges by appending sudo. You will need root privileges to install it, append sudo to invoke it as a root.

