From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: RichGlazier@netscape.net Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: how does mtime work Date: Mon, 24 Mar 2003 11:25:27 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <6D042E43.4959C1A8.3ED58B64@netscape.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1048523614 24131 80.91.224.249 (24 Mar 2003 16:33:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2003 16:33:34 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Mon Mar 24 17:33:33 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18xUtB-0006Gy-00 for ; Mon, 24 Mar 2003 17:33:33 +0100 Original-Received: (qmail 26656 invoked by uid 5); 24 Mar 2003 16:33:26 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 26647 invoked by uid 49493); 24 Mar 2003 16:33:26 -0000 Original-Received: from richglazier@netscape.net by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(1.8/5.0):. Processed in 0.55127 secs); 24 Mar 2003 16:33:26 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 24 Mar 2003 16:33:25 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HC900MFAHO0OC@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 24 Mar 2003 11:33:24 -0500 (EST) Original-Received: from imo-d01.mx.aol.com (imo-d01.mx.aol.com [205.188.157.33]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HC9000F4HMUZ0@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 24 Mar 2003 11:25:43 -0500 (EST) Original-Received: from richglazier@netscape.net by imo-d01.mx.aol.com (mail_out_v34.21.) id g.1b7.548c5a1 (16213) for ; Mon, 24 Mar 2003 11:25:27 -0500 (EST) Original-Received: from netscape.net (mow-d15.webmail.aol.com [205.188.139.131]) by air-in01.mx.aol.com (v92.17) with ESMTP id MAILININ11-3f553e7f317774; Mon, 24 Mar 2003 11:25:27 -0500 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Atlas Mailer 2.0 Xref: main.gmane.org gmane.os.tru64.managers:3758 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3758 I should have RTFM, "M" being man page in this case- should have read it more carefully in any case. I choose two responses to summarize: The man page is not as helpful as it might be. The important thing to know is that (roughly speaking) find . -mtime n gives you files modified in a 24-hour period n days ago and find . -mtime -n gives you files modified less than n days ago, and find . -mtime +n gives you files last modified more than n days ago. So nearly always you want the second or third form, e.g. find . -mtime -30 -Bob Vickers --- You didn't read the "find" reference page carefully enough. "-mtime" is one of the several switches that takes a numeric argument in one of three forms: an unsigned integer means EXACTLY that value, put a minus sign in front and it means the value or less, put a plus sign and it means the value or more. So, if you want to see the files modified 2 or more days ago, use "-mtime +2" (that is strictly more than 1 day ago), if you want to see files modified in the 24 hour period two days ago, code what you coded, if you want to see the files modified in the last 24 hours, use "-mtime -1" or "-mtime 1", they mean the same thing. It's messy. The way you were doing it keeps changing the 24 hour time slot, so it finds different files each time. -Tom Blinn __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promos=380455