Xref: utzoo comp.unix.questions:29863 comp.unix.shell:1761 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!talon.UCS.ORST.EDU!usenet!ogicse!intelhf!ichips!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions,comp.unix.shell Subject: Re: Finding files modified "today" (now "find") Keywords: awk bsd shell Message-ID: <1991Mar27.164459.29732@chinet.chi.il.us> Date: 27 Mar 91 16:44:59 GMT Article-I.D.: chinet.1991Mar27.164459.29732 References: <55345@sequent.UUCP> <1991Mar15.182242.18780@athena.mit.edu> <3450@unisoft.UUCP> Organization: Chinet - Chicago Public Access UNIX Lines: 25 In article <3450@unisoft.UUCP> greywolf@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 -print | xargs /bin/ls -..." >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@chinet.chi.il.us