Verifying sdcards

TL;DR: Verify sdcards on the fly DEV=/dev/sdX && \ dd if=/dev/urandom bs=4096 count=$(( $(sudo blockdev –getsz $DEV) / 8)) \ | pv | sudo tee $DEV | md5sum ; \ sudo dd if=$DEV bs=4096 count=$(( $(sudo blockdev –getsz $DEV) / 8 )) \ | pv | md5sum I have a few sdcards which are probably