Technical article 104834

Maximum number of subdirectories allowed in a directory in OpenServer 5

OpenServer 5.0.0

Written · Last revised

Problem

In SCO UNIX System V/386 Release 3.2 Operating System Version 4.2,
there was a limit of 998 subdirectories.  Has this been changed
in SCO OpenServer Release 5?

Cause

Each directory links itself to its parent directory.  There
is a non-configurable kernel limit of the number of links to
any file.  In SCO UNIX Version 4.2, the limit was 1000.  Thus,
you could create 998 subdirectories in any given directory.
The other two links are to the directories '.' and '..' which
are the current directory and the parent directory, respectively.
In SCO OpenServer Release 5, the maximum number of links has
been raised to 32767, resulting in 32765 as the maximum number
of subdirectories.

Solution

Since this is not a configurable kernel option, there is no
workaround.  You must create a directory structure that does
not require more than 998 subdirectories in any given directory
for SCO UNIX Version 4.2, or 32765 for SCO OpenServer 5.0.0.

NOTE: There is no limit on the number of files you can have in a directory.

See also

TA106337, "What is the maximum number of subdirectories allowed in a directory?"

From the Xinuos technical article database, record 104834. Reproduced with permission. The original is at www.sco.com/ta/104834, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.