Perform a read-only bad-block scan.
Section: Check and Repair
Scan a device for bad sectors
bash
bash
sudo badblocks -sv /dev/sdbExplanation
Perform a read-only bad-block scan.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Check and Repair
Destructive bad-blocks write test
Use only on disks you can erase completely.
Show full SMART data
Inspect temperatures, reallocated sectors, and error logs.
Run fsck on an unmounted filesystem
Dispatch to the correct fsck helper based on filesystem type.
Force an ext filesystem check
Run a full ext filesystem check even if marked clean.
Auto-fix ext filesystem issues
Automatically answer yes to filesystem repairs.