Disk and Storage

badblocks

Tests block devices for bad blocks.

badblocks scans storage for unreadable or unreliable blocks.

Syntax
badblocks [options] device

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Read-only scan
sudo badblocks -sv /dev/sdb

Scans /dev/sdb without writing test patterns.

Use with care
sudo badblocks -wsv /dev/sdb

Runs a destructive write-mode test.

badblocks Command
FieldDetails
Commandbadblocks
CategoryDisk and Storage
Primary useTests block devices for bad blocks.
Syntaxbadblocks [options] device