How to Fix Corrupt SD Cards in Linux

This is the first of many Linux tips and tricks that I would be posting on my blog, my fat32 formatted SD Card recently got corrupted and I was nervous as I had stored some important pictures on the card. After searching on the internet for a solution, I came across a fsck Linux command that does the trick:

sudo fsck.msdos -aw /dev/mmcblk0p1

/dev/mmcblk0p1 being your sd card device

aw - this option automatically repairs the filesystem and writes any changes to disk immediately

· linux