From owner-freebsd-questions Thu Mar 27 10:10:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA02506 for questions-outgoing; Thu, 27 Mar 1997 09:52:30 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA02456 for ; Thu, 27 Mar 1997 09:52:20 -0800 (PST) Received: from mixcom.mixcom.com (mixcom.mixcom.com [198.137.186.100]) by who.cdrom.com (8.8.5/8.6.11) with SMTP id GAA04022 for ; Thu, 27 Mar 1997 06:21:25 -0800 (PST) Received: by mixcom.mixcom.com (8.6.12/2.2) id IAA24863; Thu, 27 Mar 1997 08:21:42 -0600 Received: from p75.mixcom.com(198.137.186.25) by mixcom.mixcom.com via smap (V1.3) id sma024841; Thu Mar 27 14:21:14 1997 Message-Id: <3.0.32.19970327081343.00ba6ac0@mixcom.com> X-Sender: sysop@mixcom.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Thu, 27 Mar 1997 08:13:44 -0600 To: wss@king.cts.com From: "Jeffrey J. Mountin" Subject: Re: Max # of files in One Directory Cc: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 12:55 PM 3/26/97 +0000, wss@king.cts.com wrote: >I am using FreeBSD. >I currently have one directory containing 7000+ files. >Is there a limit on the total number of different files that >can be in a single directory? If so, can that limit be changed >by tweeking with the kernel, if so, where should I look? I don't know of any limit offhand, but will say that this is not a good idea and is a good example of when to start using sub-directories. Just consider how long it takes for a dir to even start writing to the terminal, now consider that any program accessing a file in such a long directory listing. What I know will not work is 'rm *' and it will say "argument list too long" and choke. We have one web site that has over 9000 files and directories. This was also in the document root for the site. Mentioned the problems and made some suggestions. drwxr-xr-x 9 harry wheel 527360 Mar 25 23:39 yellowplaces ^^^^^^ [root]:/www/yellowplaces > dir | wc -l 8544 OK, almost 9000 (more files on the way), but it this took 25 seconds on a 486/DX2-66 on a SCSI drive. I don't venture into this dir, unless the want help changing the structure. 8-) When mail spool directories and home directories for users grow in the 1000+ range it is time to divide things from a to z and speed things up. ------------------------------------------- Jeff Mountin - System/Network Administrator jeff@mixcom.net MIX Communications Serving the Internet since 1990