Finding files modified "today" (now "find")
Leslie Mikesell
les at chinet.chi.il.us
Thu Mar 28 02:44:59 AEST 1991
In article <3450 at unisoft.UUCP> greywolf at unisoft.UUCP (The Grey Wolf) writes:
>One way to accomplish finding all files modified today is to go by a
>timestamp file which was touched at midnight, and use
>"find . -newer <timestampfile> -print | xargs /bin/ls -<lsopts>..."
>or whatever is most optimal.
>I think find(1) needs yet more improvement, most of all in the department
>of time granularity (if you can call a day "granular" -- seems like a large
>boulder to me...). Oh, and a -ctime option would be nice...
Huh? -newer works down to the second so the granularity is limited to
however often you touch the checkpoint file. The -ctime and -mtime
and -atime options work on day granularity though (i.e. +days or -days).
There is a problem in maintaining atime and ctime unless you do backups
with a read-only mount. Using cpio you have a choice of letting it
modify the access time or not. If you let it fix the access time, then
it will modify the ctime instead as a side effect.
The real problem with find is that it always wants to recurse and
(at least with the SysV versions) there is no way to limit it to
the current directory.
Les Mikesell
les at chinet.chi.il.us
More information about the Comp.unix.questions
mailing list