Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted

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".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.