Sorting files and directories on a FAT-formatted USB memory stick

from blog Kevin Boone's website, | ↗ original
Many portable and automotive media players accept USB memory sticks or SD cards containing audio files. Very often, these players have no sorting logic, and display files and directories in the arbitrary order they appear in the filesystem. This article describes how to sort a FAT filesystem using Linux utilities, to make playback more convenient.