On 1/18/2011 9:24 AM, Brad Knowles wrote:
> On Jan 17, 2011, at 11:28 PM, Aaron McCaleb wrote:
>
>> Actually, you _can_ sorta use find(1) to find files changed in the
>> last hour ...or any arbitrary time interval... but it means you have
>> to use the '-newer<file>' test.  That means you have to create a file
>> with the arbitrary mtime using touch(1).
>
> That's what I meant by "they don't necessarily make it so easy".  It is 
> physically possible, yes.
> ...You still have to do multiple runs with different "-newer" files, and then 
> look at the differences in the output to determine which files were changed 
> within which timeframe.  That also assumes that nothing else on the system is 
> mucking about with atime/ctime/mtime values on files.

If your system's find(1) is based on gnu find, you don't need to touch a 
reference file for use with -newer. You can use -mmin. If you want to find all 
files changed in any particular hour (or any other time period), you can use
   find /path... -mmin -S -mmin +E ...
where S is the start time (expressed as number of minutes from now to start 
time) and E is the end time of interest. Using -printf, you can format the 
output to provide whatever data from stat you want, ready to import into a 
spreadsheet or database.

        ...jay
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to