In near past I was presented with the interesting problem in the Linux OS world. The standart solutions of this problem in standart cases involve two or three commands to end troubles instantly. However, to my surprise, Linux was not prepared for any solutions to this particular case. This post shares my solution.
The problem description sounds too easy: need to delete files in one directory. But not just some amount of files – insanely huge amount of files, more than 10 millions of them. Maybe the backstory of “why so much” is interesting, but lets keep to the point. Linux can’t hold indefinate count of files. But when it does so close to limits, linux should deal with this problem. Ext3 and Ext4 is advertised to handle large amount of data, but somehow the tools fail to properly manage it. Surely, system can store and serve when specifically asked, but cannot list or wipe them easily.
(more…)