Commands
badblocks
[ -b block-size ] [ -o output_file ] [ -s ] [ -v] [ -w ] device blocks-count [ start-block ]
This command is used to search for bad blocks on a hardware device. You should specify the device (e.g., /dev/hda1) and the count of the number of blocks on the device.
Example: To check /dev/hda1 for bad blocks, use
badblocks /dev/hda1 3096-b block-size | Specify the size of blocks in bytes. |
-o output_file | Specify a file to which the list of bad blocks is output. Default is to display to standard out. |
-s | Progress indicator. Display the block numbers as they are checked. |
-v | Verbose output. |
-w | Write-mode test option: badblocks will write ... |
Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.