I’d recommend trying the rdisk version first. Note: I should have used /dev/ rdisk1 but I didn’t know that rdisk was raw/faster access to disks at the time.
In my case, it’s the second external disk drive I connected which contains deleted files I want to recover so, I highlight “Disk /dev/disk1 – 2000GB / 1862 GiB (RO)”.
disks are named, use Disk Utility (Applications -> Utilities -> Disk Utility), then click to highlight your disk of interest (the lines with disk icons that are not indented) and click the circle i button to get info. If you want to see what your disk0, disk1, diskX, etc.
My Mac is a Macbook Pro from 2012 and I chose the 250GB disk option so I recognize the disk as the first disk in the list which reads: Disk /dev/disk0 – 251GB / 233 GiB (RO). You can see its size which may help identify it.
dev/disk0, /dev/disk1, /dev/disk2, plus 3 similar with “r”disk.
Enter your password and hit return/Enter to proceed to the home screen. Then photorec will restart itself using sudo. Without using sudo photorec may return an error of “No disk found”.
In my case, I could not see the partition where my accidentally deleted files were stored as I didn’t use sudo and I nearly gave-up and paid the extortion fees for a paid undelete program. In some cases this won’t be necessary, but it doesn’t hurt and will ensure you see all of your disk partitions where your deleted files may be stored. It is key that you use sudo to run the photorec program which will undelete / recover deleted files from your Mac drives.