Solved

CentOS Number of Files Per Directory

Posted on 2012-12-26
3
536 Views
Last Modified: 2012-12-30
Is there a maximum number of files that can be stored in a single directory on a CentOS 5.8 Server?
0
Comment
Question by:deklinm
  • 2
3 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38721936
Here is an excellent article on that topic:

http://www.frank4dd.com/howto/various/maxfiles-per-dir.htm
0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 250 total points
ID: 38721996
Which file system are you talking about?  Most frequent file system used in CentOS 5.8 is ext4 but xfs and other file systems are pretty frequent as well.

It allows 64000 sub directories per directory
http://en.wikipedia.org/wiki/Ext4

These may help you as well:
http://serverfault.com/questions/104986/what-is-the-maximum-number-of-files-a-file-system-can-contain
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 38729028
Basically, there is no practical limit to the number of files under a directory, but there are limits per filesystem.

The maximum number of files per filesystem depends on the number of available inodes, which is either defined at creation time (e.g. ext3/4, jfs) or dynamic (e.g. jfs2) or fix (zfs).

The allowed maximum in ext4 is 4 billion, the fixed maximum in zfs is 2**48 (256 Tera).

There is also a limit to the number of subdirectories under a given directory, e.g. 32000 for ext3, 64000 for ext4.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question