From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 17:57:09 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14F9416A4CE for ; Thu, 3 Feb 2005 17:57:09 +0000 (GMT) Received: from av9-2-sn1.fre.skanova.net (av9-2-sn1.fre.skanova.net [81.228.11.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB95E43D2F for ; Thu, 3 Feb 2005 17:57:07 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av9-2-sn1.fre.skanova.net (Postfix, from userid 502) id B984F37E58; Thu, 3 Feb 2005 18:57:06 +0100 (CET) Received: from smtp2-2-sn2.hy.skanova.net (smtp2-2-sn2.hy.skanova.net [81.228.8.178]) by av9-2-sn1.fre.skanova.net (Postfix) with ESMTP id A58AD37E42 for ; Thu, 3 Feb 2005 18:57:06 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp2-2-sn2.hy.skanova.net (Postfix) with SMTP id 75A1937E43 for ; Thu, 3 Feb 2005 18:57:06 +0100 (CET) Received: (qmail 88257 invoked by uid 1001); 3 Feb 2005 17:57:05 -0000 Date: Thu, 3 Feb 2005 18:57:05 +0100 From: Erik Trulsson To: Robert Goossens Message-ID: <20050203175705.GA88167@falcon.midgard.homeip.net> Mail-Followup-To: Robert Goossens , questions@FreeBSD.org References: <000201c50a1b$3cc64a30$1000a8c0@binalangx1piii> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000201c50a1b$3cc64a30$1000a8c0@binalangx1piii> User-Agent: Mutt/1.5.6i cc: questions@FreeBSD.org Subject: Re: Question about filesystem and limits X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 17:57:09 -0000 On Thu, Feb 03, 2005 at 07:07:27PM +0100, Robert Goossens wrote: > Dear FreeBSD, > > I am using FreeBSD (5) on my LAN as a gatweay/router and for website developement. > I have some questions I cannot find answers for. > > Please can you tell me what are the limits of... > 1. the number of files that a directory can store. As many as can fit on the disk, i.e. no specific limit. > 2. the number of directories that a directory can have. 32765 (Each inode can have at most 32767 hardlinks to it (signed 16-bit integer), and each subdirectory contains a hardlink to its parent (teh ".." entry). Subtract the two hardlinks that each directory has (the "." entry, and the entry in the parent directory) and you end up with 32765.) > 3. the length of a path to a file name The open(2) and chdir(2) manpages says that one error that can occur is: [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. To work around this one can of course use chdir(2) to descend down the directory tree one level at a time; there is no limit to how deep down the directory tree a file may reside, just on how long pathnames one can pass to syscalls/library functions. -- Erik Trulsson ertr1013@student.uu.se