From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079036515411.tru64-unix-managers.marc@archive.invalid> From: Charles Vachon Date: Tue, 02 Feb 1999 15:22:00 +0000 To: tru64-unix-managers Subject: SUMMARY: number of entries in a single directory X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079036515411 Hello again, and thanks to the following for quick responses: Keith Piepho "J. Dean Brock" Jerome M Berkman alan@nabeth.cxo.dec.com esci The original message appears at the end of this one. The explanation to the observed condition lies in the fact that there is a maximum number of 65536 (2**16) hard links that any file or directory can have on DU, regardless of the file system type. When a directory is created with mkdir, there are 2 hard links to the directory's inode: the actual entry for the directory name in this directory's parent, and the "." entry in that directory. This is why there are always at least 2 links to a directory entry using ls -l, as in: drwxr-xr-x 2 vacch1 system 8192 Jan 27 17:14 test_directory The creation of a large number of subdirectories will eventually fail, when all 65536 hard links to the parent's directory exist. Since, each subdirectory takes 2 links, you should be able to create about 32768 subdirectories before the limit is reached. Note that this limit is irrelevant to regular files, since files do not use hard links as directories do. Some responders said they had directories containing up to 40,000 files, with no problem. Thanks again, alpha-osf-managers! #-#-#-#-#-#-#-#-#-original message-#-#-#-#-#-#-#-#-#- Hello DU-admins, Can someone explain me where does the 32768 (2**15) entries in a single directory on DU come from? Both ADVFS and UFS exhibit the same limit. Don't get me wrong! I do NOT have the intention of putting this large a number of files or directories hanging out from a single directory. I'm just curious, since I experienced this condition yesterday, after a cleanup job ran daily in cron was commented out, letting a directory grow up to the point that it was impossible to create a directory (mkdir) or a file (touch) into it. I've peeked here and there trying to find some documentation on this limit, to no avail. TIA -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Charles Vachon tel: (418) 627-6355 x2760 email: cvachon2@mrn.gouv.qc.ca Administrateur de syst=E8me FRCQ/Minist=E8re des Ressources Naturelles du Qu=E9bec =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D