Max number of Folder in Solaris 8

Hi,

Anyone can help ?

I have 21,000 sub-folder under the main folder .

Now are having some problem writing .

Is there a max no. of sub-folder can be create under Solaris .
If yes ,what is the max no. , can it be configure to increase ?

Thanks

Do you mean just 21000 directories at the same level inside the main directory? Or do you mean /main_dir/subdir1/subdir2... so on?
If you have the first one, then you have probably not hit any restriction except perhaps the disk getting full. Have you checked that?
For the second, you have most probably hit the path length restriction.

The max length of the path a shell can handle depends on the shell. Bash, I think handles paths up to 1024 chars long.

Hi,

It is under one folder

/mainfolder/1
/mainfolder/2
/mainfolder/3
.
.
/mainfolder/21000

Is there a limited on the number

well, i would say, that the maximum number of directories is based on your inode numbers of that filesystem..

root@mp-wst01 # df -o i .
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t2d0s6       2795  866837     0%   /downloads
root@mp-wst01 # mkdir test
root@mp-wst01 # mkdir test2
root@mp-wst01 # mkdir test3
root@mp-wst01 # mkdir test4
root@mp-wst01 # df -o i .
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t2d0s6       2799  866833     0%   /downloads
root@mp-wst01 #
root@mp-wst01 #
root@mp-wst01 # x=4
root@mp-wst01 # while (((x+=1)<30000)); do mkdir test$x; done
root@mp-wst01 # df -o i .
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t2d0s6      32798  836834     4%   /downloads
root@mp-wst01 # ls | wc -l
   29999
root@mp-wst01 #
root@mp-wst01 # ls -i | head
 665989 test10
 666079 test100
 666979 test1000
 693868 test10000
 693869 test10001
 693870 test10002
 693871 test10003
 693872 test10004
 693873 test10005

i am not sure if there is a limit, but i have one costumer with more than 1 million files in one directory and it works... it's very slow, some commands take up to 5 minutes like "ls", but it works :stuck_out_tongue:

regards pressy

btw: it took about 8 minutes to create these 30.000 directories :wink:

Completely agree pressy. The limit is the number of inodes. In a UNIX system:
1 inode = 1 file
When you create a filesystem, you can define the number of inodes, but you cannot change it once created.
Take into account that no matter how much free space you have. If you run out of inodes you won't be able to create more files on your filesystem.
Regards.