this command is only available for linux! 😉
badblocks -nvs /dev/sdb
This would check the drive „sdb“ in non-destructive read-write mode and display progress by writing out the block numbers as they are checked.
badblocks -wvs /dev/sdb6
This would check the sixth partition of the drive „sdb“, in destructive (!WARNING ALL DATA WILL BE LOST!) read-write mode (-w = write-mode), which writes 4 different patterns on the whole partition and verifies each by reading back. It displays progress by writing out the block numbers as they are checked (-s = show, -v = verbose). All data on the partition will be overwritten at the block level.
badblocks -wvsb 4096 /dev/sdb creditz: https://en.wikipedia.org/wiki/Badblocks