From owner-freebsd-questions@FreeBSD.ORG Mon Jun 6 14:01:56 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06D7D16A41C for ; Mon, 6 Jun 2005 14:01:56 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D29443D49 for ; Mon, 6 Jun 2005 14:01:55 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (localhost [127.0.0.1]) by clunix.cl.msu.edu (8.12.10+Sun/8.12.2) with ESMTP id j56E1gJF019889; Mon, 6 Jun 2005 10:01:42 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.10+Sun/8.12.2/Submit) id j56E1gJ4019888; Mon, 6 Jun 2005 10:01:42 -0400 (EDT) From: Jerry McAllister Message-Id: <200506061401.j56E1gJ4019888@clunix.cl.msu.edu> To: lists@natserv.com (Francisco Reyes) Date: Mon, 6 Jun 2005 10:01:42 -0400 (EDT) In-Reply-To: <20050606095343.D86876@zoraida.natserv.net> X-Mailer: ELM [version 2.5 PL7] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions List , Dan Nelson Subject: Re: Looking for files older than n number of days? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2005 14:01:56 -0000 > > On Sun, 5 Jun 2005, Dan Nelson wrote: > > >> I ran it on a directory and was surprised to find that both -5 AND +5 > >> listed a file from February. :-( > > > > -5 definitely should not, and doesn't on my system. It should be > > interpreted as "less than 5 days from midnight tonight". > > I think I found a bug in find. > If you add the '-ls' parameter before the -mtime it ignores mtime. > Example: > find . -ls -mtime -5d > Shows all files in directory. > > > find . -mtime -5d -ls > Shows correctly files modified less than 5 days old. I am not sure it is exactly a bug. It seems to be dependant on how find processes its parameters - in order of occurance. A similar effect can be seen with some other parameter combinations such as putting -print in the wrong place - you can get all files in the system printed or none rather than just what you want. Possibly the man page needs to be updated to make the effect of parameter order clear. ////jerry > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >