When the testdisk utility displays all the directories of your operating system, go to the directory from which you deleted / lost the file.
![testdisk mac trash testdisk mac trash](https://www.bestmaccleaner.com/wp-content/uploads/2021/06/TestDisk.jpg)
Step 7: Go to the directory where you lost the file This will list all the directories in your section. Make your selection, and then select the List option from the options shown at the bottom of the screen. I lost my file when I used Linux, Debian. If the selected drive has several partitions, on the next screen you can select the appropriate one. Step 6: Select the disk partition where you lost the file In this utility, if you reach a point that you were not going to, you can go back using the q key. To do this, select the Advanced option and press Enter. But here we are only interested in recovering our accidentally deleted file. Using the options shown in the screenshot above, you can select any of these functions. Recovering lost files is only one of the features of testdisk, the utility offers much more. When you specify the correct drive and its partition type, the following screen appears: Step 5: select “Advanced” to restore files If you are sure that the data of the test disk is incorrect, you can make the right choice from the list and press Enter. The utility will automatically highlight the correct selection. Now that you have selected the drive, you need to specify its type of partition table on the following screen: Step 4: Select the partition table type of the selected drive As indicated in the note in the screenshot above, to successfully restore the file, you must determine the correct disk capacity.
![testdisk mac trash testdisk mac trash](https://osx86project.org/blog/wp-content/uploads/2021/07/restore-files-with-TM-scaled.jpg)
Select Proceed using the left and right arrow keys, and press Enter. In my case, it shows my hard drive, as this is the only storage device on my system.
![testdisk mac trash testdisk mac trash](https://www.cleverfiles.com/wp-content/uploads/2020/11/restore-deleted-files-on-mac-from-trash@2x.jpg)
The utility will now display a list of drives connected to your system.