5 ms·
Yeah ... However, lets just accept that regular people don't know those tricks and we should keep files in subfolders? I have that logic in any app that has po
by majkinetor 5y ago
Yeah ...
However, lets just accept that regular people don't know those tricks and we should keep files in subfolders? I have that logic in any app that has potential to spam a directory. You can still show them as a single folder (somewhere called branch view) if you like but every other tools that uses ls will work like a charm (such as your backup shell script)
- yjftsjthsd-h 5y agoThen anything working on it needs to recurse.
- SilverRed 5y agoOnly if you have multiple layers of depth. You can easily have a single layer and then its a flat loop to list everything and broken up in to multiple much faster operations. I haven't looked in to the details but one system I can imagine is hashing the file names and then placing the file in the folder named with the first x parts of the hash. Then to look up you can use the filename to work out exactly which folder the file is in and you never exceed a set limit for files in one folder. If we say 3000 files is perfectly safe in a single folder, 3000 folders with 3000 files holds 9M files.