efficient directory structures w/ lots of files
Chuqui[The Time Traveller]
chuqui at nsc.UUCP
Wed Dec 19 07:31:18 AEST 1984
I'm putting together something that will involve storing lots of small
files in a database so that they can be accessed. I'm looking for
interesting ideas on how to build a directory structure that can be gone
through quickly and easily for this purpose. Normally, I use one of two
ways of dealing with it:
o using part of the filename as a key into the directory structure. If
the filename is foo, it could be stored as ./f/foo or even ./f/o/foo
of some such
o building some kind of external lookup table and building some kind of
directory structure in an incremental fashion (create subdirs 1-n, and
then store files as 1/foo, 2/bar,..., n/bletch, 1/blurfl).
Has anyone experimented with building hashed directories or some other form
of directory structure that doesn't make assumptions about the name of the
file or number of files in the structure? I want to minimize the quadratic
effect of Unix directory structures while maximizing the bushiness--
perhaps some tree balancing algorihm may be neccessary.
comments, suggestions? (code? :->)
chuq
--
>From behind the bar at Callahan's: Chuq Von Rospach
{allegra,cbosgd,decwrl,hplabs,ihnp4,seismo}!nsc!chuqui nsc!chuqui at decwrl.ARPA
The evil that men do lives after them; the good is oft interred with their
bones. So let it be with Caesar. The noble Brutus hath told you Caesar was
ambitious... And Brutus is an honorable man
More information about the Comp.unix.wizards
mailing list