Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2000 16:40:35 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Wayne McAlpine <wayne.mcalpine@home.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Question
Message-ID:  <20000413164035.A25700@hades.hell.gr>
In-Reply-To: <001f01bfa4ca$8bfee4b0$bb15fea9@1wn.com>; from wayne.mcalpine@home.com on Wed, Apr 12, 2000 at 04:00:42PM -0600
References:  <001f01bfa4ca$8bfee4b0$bb15fea9@1wn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 12, 2000 at 04:00:42PM -0600, Wayne McAlpine wrote:
> Hello,
>
> Would you happen to know what the maximunm amount of files and/or sub
> directories that one can have in any single directory on a freebsd
> ufs file system ? I'd really appreciate your response if you know the
> answer.

I suspect that for the number of files, there is no theoretical limit,
other than the limit of the available i-nodes on your filesystem.  After
a truly huge number of files have been created in a single directory,
performance is likely to degrade though.  Perhaps it all depends on what
will happen first: your filesystem run out of i-nodes, or performance
gonne that way...

However, for the nesting of subdirectories, there seems to be a limit.
I tried this:

	$ cd /tmp
	$ while true; do mkdir 0; cd 0; sleep 0; done

and waited to see whether it would stop or fill the rest of my /tmp
partition with empty directories [yeah, i know, i like living on the
dangerous side of the moon].

It stopped several levels down, and the last directory that my shell
(currently bash) would not give me the error:

        cd: could not get current directory: getcwd: cannot access
          parent directories: No such file or directory

was at a depth that I could see:

	% pwd | wc
	       1       1    1023

One level deeper, bash would not chdir, pwd would fail, etc.
The limit seems to be that of a maximum pathname containing 1023
characters.  I suspect POSIX has something to do with this :/

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public pgp key: finger keramida@diogenis.ceid.upatras.gr
See the headers of this message for the key finger-print.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000413164035.A25700>