Linux command “badblocks” with example

badblocks : badblocks is a Linux utility to check for damaged sectors on a disk drive. It marks these sectors so that they are not used in the future and thus do not cause corruption of data.

Command : badblocks

description : search a device for bad blocks

Example :

$sudo badblocks  -v  /dev/sdb1

here ‘-v’ to display the output and /dev/sdb1 is the device name


Important  note: If  the output of badblocks is going to be fed to the
e2fsck or mke2fs programs, it is important that the block size is prop?
erly  specified,  since  the block numbers which are generated are very
dependent on the block size in use by the filesystem.For this reason,
it  is  strongly recommended that users not run badblocks directly, but
rather use the -c option of the e2fsck and mke2fs programs.

Related Posts with Thumbnails

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment moderation is enabled. Your comment may take some time to appear.