Fake USB flash drives exist. The actual capacity of such a drive is much less than advertised and when you fill them up you lose your data. How do you detect these fake USB drives and get to know the true capacity?
f3 is the software that can come to your aid. It follows a simple algorithm: fill the whole drive with a data of known pattern and read the whole data to determine how much of it is correctly readable.
f3 is open source, free and supports multiple platforms – Linux, Apple Mac, Windows/Cygwin and FreeBSD.
To use f3 you need to compile it from source. Get it from the GitHub repository and run:
Mount the pen drive you want to test. f3 has two components or utilities to write and read data. You do not need to be root to run the utilities. Example usage:
$ ./f3write /media/5EBD-5C80/ $ ./f3read /media/5EBD-5C80/