Operating System - HP-UX
1834461 Members
3062 Online
110067 Solutions
New Discussion

Maximum number of subdirectories

 
Scheller Jim
New Member

Maximum number of subdirectories

Hi there -

Our application is creating a large number of subdirectories in which data is
being archived.

We find that the call to create a new directory fails after 32,767 sub
directories have been created in a single directory.

Is there some way to tune this to allow for a larger number of subdirectories
to be created?

Thanks in advance,

Jim
2 REPLIES 2
Ken Burke_2
Advisor

Re: Maximum number of subdirectories

Each subdirectory has its .. linked to the directory
that you are in. The number of links a file/directory
can have is given in /usr/include/sys/inode.h

short ic_nlink; /*2: number of links to file*/

The max value of a variable of type short is 32767.
There is no way to change this.

With such large numbers of file/directories in one
directory your performance is going to suffer.
Scheller Jim
New Member

Re: Maximum number of subdirectories

Drat... Time to start changing a lot of source code, I suppose. Thanks for your
help.