PhotoRec – Recover Deleted or Lost Files in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

23 Responses

  1. Bo says:

    I accidentally deleted 100 GB of folders and files. Recovering right now. Seems to work! Thank you. However, many new folders and randomly named files. Do you have a strategy for finding what among thousands of pointless files (e.g. cached web-content…)?

    • Aaron Kili says:

      @Bo

      You will always see new folders and randomly named files, this is part of any data recovery process. You have to manually dig through to find all your important folders and files.

  2. J says:

    I downloaded, followed the install instructions, it installed, tried:

    $ sudo photorec /dev/sda3
    

    and got this message:

    PhotoRec 7.0, Data Recovery Utility, April 2015
    Christophe GRENIER 
    http://www.cgsecurity.org
    
    Unable to open file or device /dev/sda3: No such file or directory
    
  3. Alex Flores says:

    Hello everyone, I have a question, Can I install photorec on raspbian?

    Greetings

  4. Robert Davis says:

    Wow, great writeup.
    I had to pull the chip out of my Canon to make it visible as a recoverable disk, but once I did, thes instructions recovered every photo!

  5. Jan Greeff says:

    I tried to move photos from my camera to a new folder on my hard drive but the folder landed in the camera storage by mistake. So the photos were moved into the folder and I am unable to access the folder, which is also now no longer visible.

    I have tried to recover the photos by directing PhotoRec to the folder by “sudo photorec nikon dsc coolpix l19ptp dcim 104 nikon” and have tried various spacing and / combinations but am not sure if I am on the right track re specifying the locality of the folder.

    My operating system is Ubuntu 16.04 Unity.

    • Aaron Kili says:

      @Jan

      Specify the partition from which the files where deleted, this is the camera storage represented by a file under /dev/ filesystem. You can find more information about the mount point and dev file for your camera in Linux, possibly by searching the web.

  6. RECdexy says:

    Exactly – Do not panic! In bulk cases, deleted files can reanimate – even if you have cleared the trash or did not used the trash when deleting files.

    For effective resuscitation deleted data should execute some actions. Do not be discouraged – for this, it is not necessary to be an expert in the field of information technology, you also do not need to pay hundreds of dollars to a specialist professional for restoration of your remote information.

  7. yagnajee says:

    Hi,

    It was really working superb. nice article i recovered my photos simply and very easily. thank you for sharing this post with us. keep moving

  8. Pedro says:

    Hi,

    I accidentally deleted the a picture folder that has many folders inside (like 001,002,003,004..etc), can it restore the whole folder structure? or just get the files back?

    Thanks

  9. Faruk ÜNAL says:

    Thanks a lot, thanks a lot! I’m a student in Turkey, so I can’t express myself but you saved me!

  10. niraj vara says:

    not working only creating a lots of directory like recup_dir.(1..33) . inside that directory nothing found useful to recover the files or folder…

    • Aaron Kili says:

      @niraj

      Did you specify the type of files you want to recover, i mean the extensions? It worked fine for me, however, if you have stored more files recently on the partition you are trying to recover from, your files deleted earlier on get overwritten.

      Try to use it on another partition and see if it works. Thanks for the feedback.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.