

But if you take a hard look at the description of the options, you'll see that what we want to do is in Advanced. In case you haven't noticed, this tool is not just for recovering deleted files, but a powerful disk utility. 1.6 – Selecting the utilityĪt this stage we will need to analyze it a little better. Now let's follow the same advice as in step 4 and trust TestDisk's suggestion. Do not forget to select the option in the navigation menu proceeded. Select the partition where your file was, if you don't know which one it is, continue following the tool's recommendations, in my case it's Kingston's pendrive disk. In this step you will see a listing of your disks. The recommendation is almost always right, so the first thing we need is to create a log file with the option Create. You are probably using a higher version of 7.0, so many of the recommended commands will already be highlighted. Keep calm, we're close to recovering your file! Use arrow keys to navigate between menus and enter key to select. Now run TestDisk on the terminal with the command:ĭon't be scared by the interface, it's very intuitive.
LINUX MINT TESTDISK INSTALL
Sudo apt install testdisk 1.2 – Running TestDisk

On Ubuntu/Debian you can install using the package manager straight from the terminal: Most linux distributions already have this tool in their repository.

1.1 – Installing TestDiskįirst we need to install the TestDisk tool. Our example scenarioĪnd look how cool, I don't panic anymore, and it's not because we're in a simulated scenario but because I know that all I need to do to recover is use the right tools! As a bonus, you'll get that feeling that you've become a hacker recovering files from the beyond.

I'll explain our example: I have a pendrive with three files, and I accidentally deleted it with the command rm curriculum.txt my precious resume, I spent hours writing, oh heavens! When we delete it from the command line, our file doesn't automatically go to the trash, so it looks like it's gone for good.
LINUX MINT TESTDISK HOW TO
If you are not sure what the partition type is, use the command df -Th to list all partitions and their disk drive types: df -Th 1 – How to recover deleted files on Linux using TestDisk If you are in EFI mode and/or the partition your deleted file was on is ext3 or ext4, follow her step 1.1 and then jump to Recovering Deleted Files with Photorec. use the tools to recover your deleted files. Now that you're calmer, let's get to the good part, you don't need to be a hacker to recover your deleted files, just know how to open the terminal, copy/paste some commands and follow the step-by-step instructions I'll show you how. See how to permanently and securely delete files on Linux.
LINUX MINT TESTDISK FREE
As long as you haven't saved or changed many things on your machine, this list still exists! Ufa! And just so you understand, depending on file size and free space on your hard drive, deleted files can persist indefinitely, even if you change a lot of files on your hard drive. When we delete a file in Linux, it is removed from a list and not necessarily from disk. Don't be scared if you don't have a lot of experience with the command line, it's very easy to use and you'll be able to recover any deleted files on Ubuntu/Debian and other Linux distributions. – But how do you tell me not to worry? Are you crazy?! I just deleted a script that was working for hours!!!Ĭalm down little grasshopper, in this article we'll learn how to recover deleted files on Linux using TestDisk and Photorec tools. Have you ever had that horrible feeling? A hopeless feeling that comes when you realize you've accidentally deleted an important file and it's not in the trash? Here begins the process of grief, denial, anger…īut how about not going through all the stages of grief? Breathe, don't worry and remember you're not alone! Sooner or later everyone ends up doing it in a moment of distraction.
