It will also find accidentally deleted partitions (either Apple Partitions, the newer EFI partitions and Windows MBR Partitons) and provide the necessary information for you to restore them using the Apple pdisk command (for Apple Partitions) or the gpt command for (for EFI partitions) The TestDisk program is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table).
As a result, these programs are designed for support personnel and experienced Mac users. They are used on the command line in the Terminal.
TestDisk download contains TWO programs - TestDisk and PhotoRec.