unix question: files per directory

Dan "Bucko" Smith dansmith at well.UUCP
Wed Apr 19 12:25:37 AEST 1989


>As quoted from <6576 at cbmvax.UUCP> by grr at cbmvax.UUCP (George Robbins):
>+---------------
>| In article <24110 at beta.lanl.gov> dxxb at beta.lanl.gov (David W. Barts) writes:
>| > How many files can there be in a single UNIX directory
>| > (I realize this may depend on the variety of UNIX; I expect
>| > the Berkeley fast file system would allow more)?  I need
>| > a better answer than "a lot" or "at least 2000", if possible.
>| 
>| At least 33,000  8-) 
[etc...]

	One thing to keep in mind that I haven't seen brought up yet...

	You don't want so many files in a directory that a shell
script would break on them.  You can really get stung if you have
some shell script that goes along with your application that
is going to break the first time you try to set a variable
equal to '*', and you have more than 10k or so worth of filenames.
Yep, there are workarounds (xargs, patch the shell to allow very large (64k)
variables), but if it were me, I'd really look for a way of breaking
things up in subdirectories.  Can you imagine a days worth of
Usenet articles in one directory?  It boggles the mind :-)

				dan
-- 
                         Dan "Bucko" Smith
     well!dansmith  unicom!daniel at pacbell.com  daniel at island.uu.net
ph: (415) 332 3278 (h), 258 2176 (w) disclaimer: Island's coffee was laced :-)
My mind likes Cyberstuff, my eyes films, my hands guitar, my feet skiing...



More information about the Comp.unix.wizards mailing list