(Should work on most GNU/Linux distros, but I've usually used it on Debian-flavored ones (eg Xubuntu))
Assuming the to-be-checked storage media (eg USB-Stick, HDD, etc) has the physical device name of "/dev/sdX" (eg "/dev/sdc1")
Code: Select all
$ badblocks -nsv -o badblocks_list.log /dev/sdX
-s: show progress
-v: verbose
Output while checking looks like this:
Checking for bad blocks in non-destructive read-write mode
From block 0 to 59055103
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: 2.97% done, 4:04 elapsed. (0/0/0 errors)