Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!husc6!ogccse!littlei!omepd!mipos3!pinkas From: pinkas@hobbit.intel.com (Israel Pinkas ~) Newsgroups: comp.unix.questions Subject: Re: find(1) question about mtime Message-ID: Date: 4 Apr 89 19:57:15 GMT References: <976@n8emr.UUCP> Sender: news@mipos3.intel.com Organization: Corporate CAD, INTeL Corporation, Santa Clara, CA Lines: 40 In-reply-to: lwv@n8emr.UUCP's message of 3 Apr 89 15:09:50 GMT In article <976@n8emr.UUCP> lwv@n8emr.UUCP (Larry W. Virden) writes: > I am using find on both Ultrix 2.3 and SunOS 4.0.1 on a 386i. I have > a file whose ls -l date (documented as the modification time) is > April 1, 1989 at 9:09 am. On my machine, it is after 10am on April 3. > I run find filename -mtime +1 -print. My file's name does not appear. > I run find filename -mtime 1 -print. My file's name DOES appear. > > Note that it is more than 48 hours after the modification time. Why does > find insist that the mtime is only 1 day old? Actually, in most of the United States, we lost an hour between 2 and 3 am on April 2. Therefore, from 9:09 am, April 1 to 10:00 am, April 3, there was only 47:51 elapsed time. I don't know whether this is a bug or not. My understanding is that "-mtime 1" means that the file was modified 1 day ago. I assume that this means between one and two days. "-mtime +1" means more than one day. To me this means at least two days. Thus, if the modification date were 9:09, April 1, I would expect: -mtime means ------ ----- 1 10:09 April 2 through 10:08 April 3 +1 10:09 April 3 and later -1 before 10:09, April 2 * One could argue that the time should be 9:09. That is, the clock time matters, not the elapsed time. -Israel Pinkas -- -------------------------------------- Disclaimer: The above are my personal opinions, and in no way represent the opinions of Intel Corporation. In no way should the above be taken to be a statement of Intel. UUCP: {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas ARPA: pinkas%cadev4.intel.com@relay.cs.net CSNET: pinkas@cadev4.intel.com