in reply to efficient way to find most recently modified files?
Whatever filesystem you are on, storing 500,000+ files in a single directory is a really bad idea if you are regularly going to need access to some small subset of those files from short runtime scripts (eg. cgi scripts).
Given that you have a nice regular format for the filenames, it would be much better to seggregate the files into smaller subsets by using some part of that filename as a directory name. Example: You might use
or.\bobby\bobby2006-05-08.txt
.\2006\05\08\bobby2006-05-08.txt
Which of these schemes make most sense for your application will depend upon the details of the usage patterns, but the basic idea is to allow you to reduce the search space by going directly to some subset of files quickly.
|
|---|