Limit on number of files in a directory

  • Follow


Hi,

I have a directory with a huge number of files. I am running a program
that tries to create a new file for writing and it can't. Is there some
limit on the number of files in a directory. I am using Mac OS X which
is a Unix derivative.

Any help is greatly appreciated,

Michael

0
Reply michael.mcgarry (91) 11/23/2005 9:09:17 PM

>I have a directory with a huge number of files. I am running a program

What's "huge"?  10 million?  My MacOS 60G disk ended up with
about 11 million inodes with the default setup.

>that tries to create a new file for writing and it can't. Is there some
>limit on the number of files in a directory. I am using Mac OS X which
>is a Unix derivative.

Typical UNIX filesystems generally have two limits:  disk space and
inodes.  "df -i" to see if you're getting close on either.  These
are filesystem, not directory, limits, but hitting them might look
like a directory limit.

What error message are you getting?  "Out of space" serves for both
disk space and inode limits.

There might also be a limit on the number of (hard) links a file
can have, which also serves as a limit on the number of subdirectories
(the link count of a directory is 2 + number of subdirectories) but
that's usually so high that violating it is difficult (16-bit
unsigned integer, max 65535).

I'm not sure whether MacOS is any different in this regard.

						Gordon L. Burditt
0
Reply gordonb 11/23/2005 9:40:13 PM


gordonb.wqanv@burditt.org (Gordon Burditt) writes:

>>I have a directory with a huge number of files. I am running a program
> I'm not sure whether MacOS is any different in this regard.

MacOSX is very different in this regard, since it doesn't use by
default a unix file system, but HFS+, an Apple specific contraption
which is, well, different.  
Better search references on http://developer.apple.com/



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Cats meow out of angst
"Thumbs! If only we had thumbs!
We could break so much!"
0
Reply Pascal 11/23/2005 10:20:37 PM

2 Replies
451 Views

(page loaded in 0.079 seconds)

Similiar Articles:













7/20/2012 9:10:57 PM


Reply: