I mistakenly deleted the files and folder that were whole movies collection on my external drive, the only folder left is 2014, I don't know how. The problem is from shell I ran rm -rfcommand

So now I hope there is a way to restore them all, in the long past I have restored deleted data on Windows computer using data recovery software.

From the google search I came across this link: https://unix.stackexchange.com/questions/80270/unix-linux-undelete-recover-deleted-files

That shows using debugfs however I do not have any file naming : /dev/mapper/wks01-root , what should I do where it would be in case of Raspbian Jessie.

The file system on the external drive on which files and folder got deleted is NTFS.

I have lost lots of good collection of Movies until it is restored, any help would be greatly appreciated.

  • Lessons be learnt from this. Mam dla ciebie dobra radę - Zainstaluj FreeNAS z ZFS i nie martw się of głupich pomyłkach.
    – Piotr Kula
    Nov 2, 2016 at 8:36
  • No one mentionened PhotoRec yet? It works and is available for Linux, too. You can even run it on the Raspberry Pi itself.
    – Janka
    Dec 7, 2016 at 8:22

3 Answers 3


Give TestDisk a try. BUT from another computer.

As you have no Windows at hand, this runs under Linux.

Good luck.



It can be done, but let this be a lesson that there is no substitute for good backups. With the Rpi you are fortunate that you can use W32DiskImager periodically.

If you really have lost files without any kind of backups, immediately dismount the card, then get ready for this...


Hopefully you will learn to prepare instead of pray, in the future. (Of course, praying never hurts)


in the long past I have restored deleted data on Windows computer using a data recovery software

That's what you should do now then. Recovering data is about the filesystem occupying the partition where the files were stored, not the operating system or device used to do the deleting. Since the filesystem is NTFS, your best chance of recovery is via whatever tools are available on MS Windows for this purpose.

If the external drive is a spinning disk and you have not done much with it since your mistake, then your chances are pretty decent of recovering at least some of the stuff.

  • Unfortunately I don't have Windows machine now Sep 24, 2016 at 16:24
  • Well, what I can more or less promise is the file data is still there, so if you leave the drive alone until you have the opportunity to run a recovery on it, most of it should be okay. You could look around for linux based NTFS recovery tools but I doubt there is much, and probably even less will work on the Pi. But if you start using it for stuff in the meantime, the possibilities for recovery are going to diminish.
    – goldilocks
    Sep 24, 2016 at 19:57
  • Well first I would need to find out what software to use to recover than borrow windows laptop and then this recovery is going take insane amount of time . So I have started to think just sacrifice the movies lost I can download again if I need it Sep 24, 2016 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.