macOS leaves ._ files all over FAT32 cards
I copied a few thousand games from my Mac to a microSD card for a retro handheld. On the handheld, the game list had extra entries with names like ._Game.chd, and they wouldn't launch. One card had 28,000 of these files.
What they are
They're AppleDouble files. macOS attaches extended attributes to files: the quarantine flag on downloads, Finder info, and so on. FAT32 and exFAT have nowhere to store those, so macOS writes a hidden companion file, ._name, next to each one.
The Mac hides them, so you never see them there. Every other device sees them. A handheld that builds its game list by file extension sees ._Game.chd, which ends in .chd, and lists it as a game.
They also cause trouble on the Mac:
rsync --deletewarns that a folder is "not empty" when the only things left in it are._files.- A folder compare between the card and the source turns up thousands of extra files.
Cleaning them up
dot_clean -m /Volumes/CARD # merges what it can, then deletes the ._ files
find /Volumes/CARD -name '._*' -delete # catches anything dot_clean left behind
find /Volumes/CARD -name '._*' | wc -l # should print 0
dot_clean is built into macOS. The -m flag makes it always delete the ._ files, instead of only the ones it could merge.
It isn't a one-time fix
macOS writes new ones every time you copy files to the card, so clean the card after each copy, not just once. When you send files in a tarball, COPYFILE_DISABLE=1 tar -czf … keeps them out of the archive.
While you're in there, macOS also leaves .Spotlight-V100, .fseventsd, .Trashes and .DS_Store on removable drives. Most devices ignore those, but leave them out of any comparison with the source.