Run PhotoRec on a specific device

photorec

  • Deleted file recovery tool.
    It is recommended to write recovered files to a disk separate to the one being recovered from.
    More information: <https://www.cgsecurity.org/wiki/PhotoRec>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo photorec {{/dev/sdb}}

click the source code to copy install photorec on any operating system with command-not-found.com