Many monks here will typically suggest
File::Find, but if this is for a unix system (and you don't need to worry about portability to non-unix), you'll be much better off using the standard "find" utility -- not only is it easier to use and better documented than File::Find, it is also significantly faster and places a lot less load on a cpu.
I believe all versions of "find" have a "-newer" option, that will list only files/directories that have been created/modified more recently than a specified time. (The bsd version seems to have the best range of flexibility I've seen for this option, but the GNU version is likely to be just as good. If you have the Solaris version, um... you should probably get the GNU version.) It should be easy to work out how to provide the right "-newer" parameter each time the cron job runs.
(GNU 'find' is available for MS-Windows as well, if you are somehow using a Windows version of "cron".)
(updated to fix spelling error)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.