in reply to efficient way to find most recently modified files?

hello,
<br I read some of the suggestions. thanks for all the replies!

For davido's, it is not possible to always keep track of the most recent uploaded blog since I intend in the future that some of the users upload via FTP and not just through the web. sorry for not mentioning this in my first post.

And for sub directories for each member, that solution can work but will make an extra step for the uploader. Its the uploaders job to download each text file from about 5-10 users everyday 1-2 days and then upload all the text files to a directory. If i would make it a sub-directory, the uploader will always have to navigate to /bobby/, /amanda/ etc and upload each text file individually as opposed to doing the job in one step by uploading all 5-10 text files in one directory.

For the 500,000+....thats just my curiosity. the application i m building now will probably never reach the case it reads a directory with 500,000+ files, but if it ever does come to the point where i will be building one, then i can keep it in mind.

Thanks!
nick
  • Comment on Re: efficient way to find most recently modified files?

Replies are listed 'Best First'.
Re^2: efficient way to find most recently modified files?
by BrowserUk (Patriarch) on May 08, 2006 at 18:25 UTC
    And for sub directories for each member, that solution can work but will make an extra step for the uploader.

    A simple solution to that would be to have the files uploaded to a different directory and have a background script that monitors the upload directory and moves the files into the appropriate directory structure as they appear.

    The only complication is ensuring that the file is fully uploaded before you attempt to move it. If you can open the file for exclusive access that's not a problem. If not, you might have to retain a list of files in the directory along with their sizes and only move them once the size hasn't changed for a minute or two.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.