# Test harddisk for bad blocks

`# badblocks -e 10 -s -w /dev/mmcblk0`

-e max bad block count  
Specify a maximum number of bad blocks before aborting the test. The default is 0, meaning the test will continue until the end of the test range is reached.

-s show progress

-w use write mode

-n Use non-destructive read-write mode.  
By default only a non-destructive read-only test is done. This option must not be combined with the -w option, as they are mutually exclusive.

`Pass completed, X bad blocks found (R/W/C errors)`

The three numbers in the parentheses correspond to:

- Read errors: Errors encountered while reading from the disk.
- Write errors: Errors encountered while writing to the disk.
- Corruption (Compare) errors: Errors where the data read back from the disk does not match what was written (i.e., data corruption detected during verification)

`# smartctl -t long /dev/device`

remember no smart on sd cards