I'm using Ubuntu. When I tried to create a new directory under a folder with more than 30,000 subfolders, it displayed following error message:
mkdir: cannot create directory `foldername': Too many links
How can I raise the limit of subfolders number in Ubuntu?
Use a different filesystem than ext3. There's a hard limit built into ext[23]. Or, consider bucketing your directories into a multi-level hashed structure, to reduce the number of directories you need to store at a particular "layer".