You can test the functionality of USB-Sticks with checksums.
Every once in a while, a long thought lost USB stick might pop up from a dusty drawer, the underbelly of your couch or your car's glove compartment. This typically begs the question of whether it still works as it should. Here's how you can test the integrity of your USB sticks with checksums.
Well-matured, aged USB-Sticks are typically many times smaller and slower than their modern USB 3.0 counterparts – but that hardly makes them completely obsolete. Especially smaller everyday file transports don't always require the best USB stick in your collection. Plus, they can be put to good use as a backup medium by transforming them into a Windows boot stick or equipped with a nifty collection of portable tools. However, while speed and size has certainly become secondary in this context, reliability has remained an important factor. If you're out of luck, your USB stick might be nearing the end of its lifespan or it might have been damaged over the years, causing file errors and unpredictable loss of data.
See also: The latest USB drive reviews
To check whether or not your USB-Stick is still fit for duty, you can test it with the help of a checksum. These consist of a unique sequence of numbers created by a dedicated tool out of a random amount of data. By comparing the checksum of a file on your PC and with an identical copy of that file on your USB stick, you can verify the data integrity of your USB stick and determine its reliability in terms of data storage.
Creating a test file
To start off, we will need a sufficiently large test file, ideally filling your USB stick up to the brink. While its perfectly possible to take any sizable file, you can create your own custom test file with two quick commands, if there's nothing else at hand.
To do so, open up your command line tool by holding down the Windows-key + R and type in “cmd”. Once inside the prompt, navigate to your preferred saving location by entering “cd [file path]” and type in the line
echo „This is a test file“ > test.dat
followed by enter. This will create a test file consisting of mere 28 Bytes. To enlarge it through recursive repeating, you will also need to type in
for /L %i in (1,1,25) do type test.dat >> test.dat
and hit enter again. This harmless little command will then bloat your test file up to a size of one Gigabyte. In case that your USB stick is a lot larger than that, you can change the value “25” inside the brackets to “26” to create a file of two Gigabyte or to “27” to create a file of four Gigabyte. Do be careful with higher numbers however, as the size will grow exponentially and can clutter up your hard drive.
Also take a look at: How to fix a broken USB port
Checking your USB-Stick
Algorithms for checksums can come in all shapes and sizes. While highly cryptologic formulas like the SHA-256 are typically meant for professional use and would overshoot the mark in our case, the faster MD5 algorithm is much better suited to review the integrity USB sticks. Generators for this format can be found freely on the internet, but we would recommend either the graphical tool MD5summer or the command line tool MD5sums to do the job. Both of them can be found here.
Once you have installed either of them and created the checksum for the test file on your PC, copy the file over to your USB stick and test for the checksum again. If the outcome differs from your first result, your USB stick is likely broken and should not be used anymore. If should be noted that alternatively, the fault might also lie with your USB cable or USB port, though that typically proves to be much more unlikely.
This article is based on a segment by our sister publication PCWELT.de.