On Tue, Jan 18, 2011 at 19:41, Jay Plett <[email protected]> wrote: > 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, good tip! But as Brad mentioned, that still assumes that nothing else on the system is changing atime/ctime/mtime, and also still only gives you the files that have changed...not necessarily block level changes. It's still more refined than my first proposal. Also, you still lose a few data points if files were modified in more than one 'S < x < E' timeframe. (In my case, because I had a log file of the last backup, it was just easy to use the mtime of the last backup log for an "good enough" approximation of an incremental backup. But that was a long time ago, in a much smaller environment.) _______________________________________________ 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/
