If I were talking about a web hosting server, would there be a maximum limit of files per directory?

  • 3
    Any particular OS and file system you're interested in? Surprisingly, this matters. – John Gardeniers Oct 4 '10 at 2:44
  • 1
    You need to be more specific because that limit is contingent on the OS and the web server. – Satanicpuppy Oct 4 '10 at 2:45

It comes down to filesystem in most cases:

FAT-16: 512

FAT-32: 65,534

NTFS has a maximum number of files per volume, not directory: 4,294,967,295 (via Satanicpuppy)

ext2: 31,998

ext3 originally had the same limit at ext2 (31,998). However, if your distro supports dir_index I believe the only limit is your machine's ram with deteriorating performance as the directory grows beyond 100k files.

  • ext3 isn't that straightforward. The number you've listed is the directory limit(the maximum number of directories in a directory), which is separate from the maximum number of files in a directory. If your distro supports dir_index, then you can store ~200,000 files in a directory. – Satanicpuppy Oct 5 '10 at 0:16
  • Also the number you've given for NTFS is whacky: that's the maximum number of files in an entire NTFS volume, not a directory. NTFS being NTFS, if you have a volume with 1 directory, it can have 4,294,967,295 files in it, but if you have two directories, or two-hundred, they can contain in total, no more than 4,294,967,295 files. – Satanicpuppy Oct 5 '10 at 0:19
  • Additionally, some versions of Windows shell32.dll will spazz out if it tries to list more than 1 million files in a single directory. – Chris Thorpe Oct 5 '10 at 23:32

not quite sure what you mean. If you mean can a host set up a maximum file usage then yea. My host, hostgator has a 50,000 inode limit or something like that. that means any more than 50,000 files and I get banned.

If you mean like filesystems if you can set that up quotas. You can in Linux, I am sure there must be some mechanic for windows as well.


  • Ok, my mistake, I mean in one folder, what is the maximum number of files can be stored in one folder? – MacMac Oct 4 '10 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.