- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Numver of files in one directory?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:11 PM
10-31-2001 03:11 PM
This question was raised by oracle dba.
I have search for this information on the web and no luck.
Does HP have any limitation on how many files can be under one directory?
Is there any way this can affect the performance of the file system?
Thanks in advance.
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:34 PM
10-31-2001 03:34 PM
Re: Numver of files in one directory?
As far as I know the only limit that you could
come across is the inode limit on the filesystem itself. To find the number of inodes used in any directory is ll -i | wc -l or you could run the 'bdf -i' command for the filesystem in question.
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:34 PM
10-31-2001 03:34 PM
Re: Numver of files in one directory?
There is essentially no limit but there is a practical limit. First, be aware that directory searches are linear searches and thus become inefficient when the directories are large. Secondly, file name expansion in the shell, e.g. ls X* can exceed ARG_MAX and you have to start breaking that into ls X[0-4]*. Third, the directories become difficult for humans to deal with. Fourth, I have seen quite a few applications crash because the dumb programmer made the silly assumption that nobody would be stupid enough to put more than N (you fill in the blank) files in one directory. I suggest, that you use the directory structure as it was designed - a tree.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:37 PM
10-31-2001 03:37 PM
Re: Numver of files in one directory?
In Unix, even a directory
is a File i.e it''s inode
structure is the same as
that of a file. It''s size
can grow to as much as blocks
it can address (direct and indirect and indirect to indirect), which will generally be beyond a normal Filesystem size. The directory holds the two-dimensional addressing of
files mapping the filenames
to their inode numbers.
So, realistically speaking
there is no limit to number of
files in a directory.
It surely has a effect on
the performance in accessing
the files. A more important
factor is the security part.
Since all files are in one
directory. If the directory
gets corrupted, the files
are as good as gone.
Moral: avoid it, unless there
is no choice.
For more details, look
at man inode.
-Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:43 PM
10-31-2001 03:43 PM
Re: Numver of files in one directory?
I meant, "theoretically"
there is NO limit. But
practically, it will hit
the FS limit and that's the
end of the road .
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:53 PM
10-31-2001 03:53 PM
SolutionIt depents on several things
1 Number of inodes in filesystem, inode cache for performance
2 max lenght in bytes of input line (_POSIX_LINE_MAX in /usr/include/limits.h)
this one may couse commands to fail
remind the longer the path, the slower.
hope this will help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 03:53 PM
10-31-2001 03:53 PM
Re: Numver of files in one directory?
I and other sys admins tend to use 1024 as a limit on files in dirs.
HTH
Paula