Hi Ralph,
Ralph Corderoy wrote:
I've just used dd(1) to repeatedly read an SD card until it got all the
way through without an I/O error. Quite a bit of the run time was
reading what had already been successfully read because I was lazy, or
had a better way to use my time.
It occurred to me that ddrescue(1) would do a better job, but I wouldn't
want a copy created in an output file. I skimmed
https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html but
didn't see a way to do this, or a special meaning to an output file of
/dev/null.
Thanks. I'll document this. As you suggest, /dev/null (combined with a
mapfile) can be used to perform this task efficiently with a command like
this one:
ddrescue -f -r-1 /dev/sdcard /dev/null mapfile
A --scrub would be quite handy to read repeatedly until the media's
controller succeeds and re-maps the block internally.
The option '-r-1' (infinite retry passes) in the command above achieves
exactly that.
Best regards,
Antonio.