Xref: utzoo comp.unix.wizards:15578 comp.unix.questions:12891 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!tektronix!orca!tekecs!frip!andrew From: andrew@frip.wv.tek.com (Andrew Klossner) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: unix question: files per directory Message-ID: <11292@tekecs.GWD.TEK.COM> Date: 14 Apr 89 19:43:11 GMT References: <24110@beta.lanl.gov> <16839@mimsy.UUCP> <98470@sun.Eng.Sun.COM> Sender: andrew@tekecs.GWD.TEK.COM Distribution: na Organization: Tektronix, Wilsonville, Oregon Lines: 18 Larry McVoy writes: >> How many files can there be in a single UNIX directory .... > If you are on a POSIX system, try this > #include > dirsentries(dirpath) > char *dirpath; > { > return pathconf(dirpath, _PC_LINK_MAX); > } This will tell you how many directories a directory can contain, not how many files. Adding a file to a directory does not increment its link count. -=- Andrew Klossner (uunet!tektronix!orca!frip!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]