You'd be much better to just use the established tool designed for this purpose, f3 (available in APT). It doesn't require a large amount of free space on the running system for the random data file, and has a mode which can detect fake cards with a much smaller number of writes.
https://fight-flash-fraud.readthedocs.io/
https://fight-flash-fraud.readthedocs.io/
Statistics: Posted by Murph9000 — Sat Feb 01, 2025 12:18 am