simple sd card test - adsbfi/adsb-wiki GitHub Wiki

Paste this on the console:

for i in {1..50}; do
  sudo dd if=/dev/urandom of=/run/testFile bs=1M count=50 status=none
  cp /run/testFile /tmp
  sync
  sudo echo 3 > /proc/sys/vm/drop_caches
  diff -s /run/testFile /tmp/testFile
done

It should say that the files are identical 50 times. If the files differ your sd-card or much less likely your RPi is bad.