How to use TestDisk for recovery?

QuestionsQuestions8 SkillsProBasic Files OperationsNov, 24 2025
0579

TestDisk is a powerful open-source data recovery tool that can help recover lost partitions and restore deleted files. Here’s a step-by-step guide on how to use TestDisk for recovery:

Step 1: Install TestDisk

If you haven't installed TestDisk yet, you can do so using the following command:

sudo apt install testdisk

Step 2: Launch TestDisk

Run TestDisk with superuser privileges to ensure it has the necessary access to your drives:

sudo testdisk

Step 3: Create a Log File

When TestDisk starts, it will prompt you to create a log file. You can choose one of the following options:

  • Create: To create a new log file.
  • Append: To add to an existing log file.
  • No Log: To proceed without logging.

Select your preferred option and press Enter.

Step 4: Select the Disk

TestDisk will display a list of available disks. Use the arrow keys to select the disk from which you want to recover files and press Enter.

Step 5: Choose the Partition Table Type

TestDisk usually detects the partition table type automatically. If it doesn’t, you may need to select the appropriate type (e.g., Intel for most PCs). Press Enter to continue.

Step 6: Analyze the Disk

  1. Select "Analyse": This option allows TestDisk to analyze the current partition structure and search for lost partitions.
  2. Quick Search: Choose "Quick Search" to start scanning for lost partitions. TestDisk will display the found partitions.

Step 7: Deeper Search (if necessary)

If the quick search doesn’t find your lost partitions, you can select "Deeper Search" to perform a more thorough scan. This may take some time, depending on the size of the disk.

Step 8: Recovering Files

  1. Once the partitions are found, navigate to the partition where your deleted files were located.
  2. Press P to list the files in the selected partition.
  3. Use the arrow keys to navigate through the files. Deleted files will typically be marked with a red color.
  4. To recover a file, select it and press C (for "Copy").
  5. Choose a destination to save the recovered files. You can navigate to a different drive or directory to save the files.

Step 9: Exit TestDisk

After recovering your files, you can exit TestDisk by selecting "Quit" until you exit the program completely.

Important Notes

  • Stop Using the Disk: To maximize recovery chances, avoid writing new data to the disk from which you are recovering files.
  • Recovery Success: The success of

0 Comments

no data
Be the first to share your comment!