Linux/Solaris has any limit on folder size ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Linux/Solaris has any limit on folder size ?
# 1  
Old 06-28-2003
Linux/Solaris has any limit on folder size ?

Hi,

Does Linux/Solaris has any limit on folder size or number of files per folder?

Thanks
Bache Gowda
# 2  
Old 06-28-2003
I can speak with some authority about Solaris and I'm sure that linux is very similiar.

In the Unix world, we use the term directory rather than folder. The difference is important. You literally put a document in a folder, but you only put the name of a document in a directory. Once a document is in a folder, it can't also be in a second folder. But you can list the name of a document in as many directories as you want.

To fit a file into a directory, we must have room for the name of the file. But the size of the file is irrelevant.

In Unix, a directory contains a name and a inode number for every file in it. So how big can this list be? The max file size comes into play here. After all, a directory is a file itself. Under early versions of Solaris, the max file size was 2 Gb. Recent versions of Solaris now support large files. Large files are 8,589,934,592 Gb in theorical length but there is no way to attach enough disk drives to a computer to allow creation of such a large file.

But even with small files, if we say that a typical file name is 20 bytes long together with 4 bytes for the inode, then we can get 2147483648 /24 = 89,478,485 files in a directory. With smaller file names, you could up that a bit.

This however would be a very dumb thing to do. Directories are searched sequentially. Very large directories drag down system performance. I try to keep all of my directories under 1000 files.

The largest directory that I ever saw had about 130,000 files in it. Manipulating it was painful.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Maximum limit for allocation of groups to a folder in solaris 10

Hi, As per my knowledge, the maximum number of groups that can be allocated to a folder (in Solaris 10) is 16. But I wonder how this rule is applicable to folders which are mounted on NFS which can be accessed by 100s of groups? or is there is a restriction present? I have never handled such a... (5 Replies)
Discussion started by: poga
5 Replies

2. UNIX for Dummies Questions & Answers

Directory size limit

Hey everyone I'm trying to limit the size a directory can be under Solaris 10. I can find plenty of guides to do it for user home directories, ut what I'm after is an absolute limit, regardless of the user. For example: I want /export/example/ to never pass say 5 GB, no matter what user is... (3 Replies)
Discussion started by: goodvikings
3 Replies

3. UNIX for Advanced & Expert Users

file size limit?

hi, how can I find out what the limit of a file size is on unix? thanks (6 Replies)
Discussion started by: JamesByars
6 Replies

4. UNIX for Advanced & Expert Users

logrotate size limit

Hi i configured log rotate for a specific file. /var/log/sauer i configured create a file in logrotate.d # cat /etc/logrotate.d/sauer #this is a logrotate configuration file for msu_ng logs /var/log/sauer { rotate 5 size=1M daily compress ... (5 Replies)
Discussion started by: modcan
5 Replies

5. Linux

Limit directory size

Hello I want to limit the size of a directory; so a user cant copy more staff inside it then 5 Giga for example.. eg. /nfs/temp/jhon size can not increase more that 5Gb I havnt found anything on the net. Is there a way to do it? (2 Replies)
Discussion started by: jredx
2 Replies

6. UNIX for Dummies Questions & Answers

can I limit the size of a directory?

Hi, I am not root, but I need to limit the size of my directory, so that it cannot contain more than 200M of stuff inside. Is this possible? Also, how can I see the total size of that directory? If I do ls -ltrd, it does not give me the size of all the files inside the directory. And if I do df... (6 Replies)
Discussion started by: JamesByars
6 Replies

7. UNIX for Dummies Questions & Answers

Limit Folder Size

Is there a way to limit a certain folder size(e.g. Documents, Desktop)? :) (2 Replies)
Discussion started by: tisdmin
2 Replies

8. UNIX for Advanced & Expert Users

File Size Limit

Hi, I have a problem writing or copying a file 2GB or larger to either the second or third disk on my C8000. I've searched this forum and found some good information on this but still nothing to solve the problem. I'm running hpux 11i, JFS3.3 and disk version 4 (from fstyp) on all 3 disks. ... (2 Replies)
Discussion started by: HaidoodFaulkauf
2 Replies

9. Solaris

File size limit

I want to have a permanent file created - and limit the size that this file can grow.. I want a circular file.. ie max size of file is 10 mb.. and if any new data written to file the oldest data removed.. How can I do this? I am on solaris 9 x86 (3 Replies)
Discussion started by: frustrated1
3 Replies

10. Solaris

SUN Solaris 9 - Is there a 2GB file size limit?

Hi I am using SUN/Solaris 9 and I was told that some unix versions have 2GB size limit. Does this applies to SUN/Solaris 9? Thanks. (2 Replies)
Discussion started by: GMMike
2 Replies
Login or Register to Ask a Question