OS Manuals

/usr/bin/badblocks

Ext2/3/4 filesystem extra utilities

From e2fsprogs-extra 1.47.4-r5 (os), captured 2026-11-05 by running badblocks --help (exit 1). permalink

/usr/bin/badblocks: invalid option -- '-'
Usage: /usr/bin/badblocks [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]
       [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]
       [-p num_passes] [-t test_pattern [-t test_pattern [...]]]
       device [last_block [first_block]]
Options (15)
OptionDescriptionSource
-b block_sizeSpecify the size of blocks in bytes.man
-c numberis the number of blocks which are tested at a time.man
-d readThis parameter, if passed and non-zero, will cause bad blocks to sleep between reads if there were no errors encountered in the read operation;man
-e maxSpecify a maximum number of bad blocks before aborting the test.man
-fNormally, badblocks will refuse to do a read/write or a non-destructive test on a device which is mounted, since either can cause the system to potentially crash and/or damage the file system even if…man
-i input_fileRead a list of already existing known bad blocks.man
-nUse non-destructive read-write mode.man
-o output_fileWrite the list of bad blocks to the specified file.man
-p num_passesRepeat scanning the disk until there are no new blocks discovered in num_passes consecutive scans of the disk.man
-sShow the progress of the scan by writing out rough percentage completion of the current badblocks pass over the disk.man
-t test_patternSpecify a test pattern to be read (and written) to disk blocks.man
-vVerbose mode.man
-wUse write-mode test.man
-BUse buffered I/O and do not use Direct I/O, even if it is available.man
-XInternal flag only to be used by e2fsck(8) and mke2fs(8).man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.