Mac OS X external drive appears as empty in Finder, but when accessing from Terminal, files show up

ExFat drives, in my experience, behave strangely under Mac OS X after they are improperly removed. Note that this applies to both user error (ie, you forgot to press the eject button beforehand) as well as software malfunctions (ie, your computer hard crashed while the drive was inserted).

Once the improperly-removed exfat drive is reconnected to a Mac, one of a couple things tend to happen to me:

  1. The drive simply does not appear in Finder. Disk Utility can see it, but will refuse to remount it. If you run first aid, Disk Utility will display a quite-scary message saying that the drive is broken beyond repair.
  2. The drive will mount and appear in Finder, but some or all files will not be visible in Finder and/or in the terminal. The terminal and Finder may give different results as to which files are visible.

In both cases, the problem can be fixed by simply leaving the drive connected to a Mac for somewhere between 10 minutes and three hours.

You can also plug the drive into a Windows machine and run Microsoft's disk repair utility, which will allow the drive to work properly when it's reinserted into a Mac but will usually cause some files to be permanently deleted.

I have no idea why this happens. Regardless, the solution is simple: leave the drive connected to a Mac for however long it needs to repair itself.