There’s no easy way to list files in a 10-million-file directory. Our beloved find and ls will almost never do it without requiring your whole week. I know it’s a bad design to have such a beast in place, but hey… we don’t always control the design of things our customers like to deploy. And some customers seems to like to defy logic sometimes.
Anyway, having to work with such thing requires some special plumbing. I usually code something quick using getdents in C, but I always forget to put it around and end up coding everything again everytime. I was about to upload it to github this time, but I found something already there. So this is just a heads up if there’s anyone out there needing this.