01-23-07 06:26 AM
Bill Marcum wrote:
> On 22 Jan 2007 12:42:13 -0800, tester
> <bshah@citadon.com> wrote:
> man touch
> find -newer
That will work for mtime, but the original post is a bit ambiguous.
Does the poster want files selected by mtime, or by ctime? The mtime
(nominally the time of last modification) is user settable, and thus
doesn't necessarily actually reflect when a file was last changed.
The ctime, however is a timestamp of higher integrity. It will be
updated when most anything about a file is changed, and also, if the
mtime or atime (time of last access) are explicitly set (they are
user settable) to anything other than defaulting to use of the
current time, that has the side effect of updating the ctime to the
current time.
Some find implementations, e.g. GNU find, also include -cnewer, which
works similar to -newer, except the ctime of the file find is
examining is compared to the mtime of a reference file (the argument
to the -cnewer option). GNU find also has the option -daystart,
which could be quite handy. PERL also has useful find capabilities.
See also: stat(2), utime(2), perl(1), File::Find (3perl)
[ Post a follow-up to this message ]
|