Search code examples
linuxfilesystemsdirectory-structure

Max # subdirectories on Linux box


One of the things my Java application running on Linux is doing creating directories. All directories are created in /a/b/c, which at this point contains 31998 subdirs.

Evidently this is enough to not allow any more to be created.

With this 2 questions:

  • Why?
  • How can i know what the max number is?

Solution

  • It depends on your filesystem. The following thread has more information on the limits of various filesystems:

    What is the maximum number of folders allowed in a folder in Linux?