I'd like to know, is it true that there's a limit to how many folders you can have within a directory before UNIX goes haywire (or something to that effect?)
For instance, right now in an app I've got it set up so when a user creates an account, a folder is created for them (the folder named after their username.) If I'm User1, a new folder is created under:
Hypothetically, if there are 10 million users, there will be 10 million folders in that directory. If the UNIX thing is really an issue, this sounds like a huge problem.
If it's true, the simple solution I would use would be to break it up into more directories. User1 would create the following folder:
Or something like that. Now for the Ruby question: I'm still fairly new to Ruby, but I'd like to know (or a link to a reference) what code I would use to be able to grab the first letter, second letter, then third letter of the username so I can create directories for it. I would have just searched the web, but I don't really know what the shorthand term would be for "code I would use to be able to grab the first letter, second letter..."
I just need that snippet of code that lets me get the first, second, etc. letters from a strong, the rest I can take care of. Thanks!