Is there a logical limit as to how many folders I can store inside a single folder in a hosting server (linux)? I`m talking about tens of thousands of folders.
Is there a logical limit as to how many folders I can store inside a single folder in a hosting server (linux)?
Yes, there is a limit. You have a limit with everything inside the computer, because each computer is of limited resources. Especially with hard-drives, they have a limited amount of space. As each directory consumes space for it's name at least, this will be always limited by the space of the drive.
Next to that, the file-system itself has limits in the way how it organizes the data. This depends on the type and version of file-system you're using then.
Every file and directory in POSIX file systems are represented by an Inode. A number of Inodes are assigned at the time of the creation of the filesystem as a fraction of the total filesystem size. This is normally done automatically but it can also be specified manually (mkfs.ext4 -N). To see how many Inodes you have available use the df -i command:
nimblex:~# df -i Filesystem Inodes IUsed IFree IUse% Mounted on rootfs 2048273 28976 2019297 2% /
In this case, where I have a 16G filesystem, you can see that I can create over 2 million files and directories. On another 300GB filesystem ext4 formatted I have ~20 million Inodes available.