News for hackers. Stuff that matters.
Re:Backblaze 2022 SSD Drive Stats by bartvk on Tuesday March 14, 2023 @04:14AM (#35148613)
I always do this with new USB sticks. Write one random file, fill the drive with copies and then test for the checksum, for example for a 16 gig thumbdrive:

    $ cd /path/to/thumbdrive
    $ dd if=/dev/urandom of=test.bin bs=1000000 count=100
    $ for i in $(seq 1 160); do echo "Writing file $i"; cp test.bin test$i.bin; done
    $ md5 test.bin
    MD5 (test.bin) = 0d3c4fe338109b09b61fcea3e11b0e4b 
    $ ls *.bin | xargs md5 | grep -v 0d3c4fe338109b09b61fcea3e11b0e4b
I'd be happy to hear if there's a oneliner for this, though.
Re:Backblaze 2022 SSD Drive Stats by zapu on Tuesday March 14, 2023 @04:36AM (#35148742)
I've been using F3 to test new SD cards: https://github.com/AltraMayor/f3

I think it does practically the same thing as your method.

Re:Backblaze 2022 SSD Drive Stats by 4gotunameagain on Tuesday March 14, 2023 @07:38AM (#35149927)
flash uses over-provisioning, I'm not sure this script would have the desired effect.
Re:Backblaze 2022 SSD Drive Stats by sowbug on Tuesday March 14, 2023 @11:05AM (#35152664)
Related: proving that your fake $50 16TB USB drive really is fake. Really clever malicious firmware would notice your script is writing the same 100MB over and over (or the same 25K block checksums over and over), and would successfully trick your script.

Different threat model, though.