O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

badblocks

Synopsis

                  badblocks [options] device 
                  block-count
               

System administration command. Search device for bad blocks. You must specify the number of blocks on the device (block-count).

Options

-b blocksize

Expect blocksize-byte blocks.

-c blocksize

Test blocksize-byte blocks at a time. Default is 16.

-f

Force a read/write or nondestructive write test on a mounted device. Use only when /etc/mtab incorrectly reports a device as mounted.

-i file

Skip test of known bad blocks listed in file.

-n

Perform a nondestructive test by writing to each block and then reading back from it while preserving data.

-o file

Direct output to file.

-p number

Repeat search of device until no new bad blocks have been found in number passes. Default is 0.

-v

Verbose mode.

-w

Test by writing to each block and then reading back from it.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required