ExternalSort is a class that can sort large files similar to the Unix sort command. It can read the file to be sorted in small buckets associated with temporary files to not exceed the configured PHP memory limits. The buckets are sorted individually and then merged to produce the final sorted output. The class provides command line interface options so it can be executed as a command from a shell.
Plgen (Playlist Generator) is a tool that sorts files for MP3 players in a user defined order. Cheap MP3 players often come with no playlist capabilities. In addition these players often make use of the FAT16/32 file system, leading to confusion when the playing order is not alphabetical on the device even though it is shown as alphabetical in the file explorer.