how to copy HDs and SDs with dd or pv

how to copy HDs, SDs (and raspberry pi boot SDs) with dd and/or pv

assuming source device is SDC and destination device is SDD

# umount /dev/sdc1
# umount /dev/sdd1

# shred /dev/sdd

then

# dd if=/dev/sdc of=/dev/sdd

or

# dd if=/dev/sdc status=progress bs=4K of=/dev/sdd

or

# dd if=/dev/sdc | pv | of=/dev/sdd

more fun uses of pv

$ pv -d

see also