U
U
ugovin2014-10-19 09:34:33
linux
ugovin, 2014-10-19 09:34:33

What is the maximum number of folders that can be created in a folder?

It is known about files in Linux that it is better not to create many files in a folder.
And what about the folders?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir Zhurkin, 2014-10-19
@icCE

If we are talking about ext4, then the maximum number of subfolders is 64,000 .
https://ext4.wiki.kernel.org/index.php/Ext4_Howto
Sub directory scalability
Right now the maximum possible number of sub directories contained in a single directory in Ext3 is 32000. Ext4 doubles that limit and allows 64000 sub directories.

O
Optimus, 2014-10-19
Pyan @marrk2

A lot is how much? I have 90 thousand files in 1 folder, it's normal))

R
RPG, 2014-10-19
@RPG

And what does it mean "it's better not to create a lot of files"? Here are half a million files in one folder:

$ time seq 500000 | xargs touch
real	0m9.208s
# echo 3> /proc/sys/vm/drop_caches
$ time ls -U | wc -l
500000
real	0m0.393s
$ time ls | wc -l
500000
real	0m3.149s

Further, only the problems of the crooked developers of file managers, who are trying to read half a million files into memory at once, sort and request a mime type for each. And the file system digests them calmly.
Yes, and this is on a car from the last century. On core i7 it will be 2 times faster.

#
# artur #, 2014-10-19
@passshift

... similarly with folders

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question