The other days a friend came with a serious problem. They had formatted the MicroSD of her cell phone and her photos died!! Doing some research I Data Recovery found an excellent application for the console. Actually there are two: Test disk and Photo rec .
Test disk is used to recover deleted files but especially lost partitions. On the other hand , Photo rec specializes in the recovery of deleted files (especially multimedia files) and also does other things.
First of all an important point: If we know that Data Recovery we deleted or formatted something by mistake, for no reason write anything on it . If it is a partition on our PC, it is best to unmount it. And if it’s on our system partition, it’s best to turn off our PC right away and do the steps from a Live CD.
And one more thing, to recover a deleted file certain conditions must be met, and sometimes it is not that easy, and it is very unlikely (for technical reasons) to recover everything.
We only chose Free. In the next window it shows us a list of navigable folders where we can copy the files it recovers.
We can choose the folder to our liking, but if in the first step we create a directory and choose it with cd it will recover them there, because by default it does so in the Facebook folder where we were working with the terminal.
If that is correct, we press on the keyboard C and it will start saving what it finds. What’s more, during the operation it will display a list with the number of different files found.