From owner-freebsd-questions@FreeBSD.ORG Mon Jun 6 14:27:17 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 2102116A41C for ; Mon, 6 Jun 2005 14:27:17 +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 CB9B343D49 for ; Mon, 6 Jun 2005 14:27:16 +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 j56ER6JF019985; Mon, 6 Jun 2005 10:27:06 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.10+Sun/8.12.2/Submit) id j56ER6jZ019984; Mon, 6 Jun 2005 10:27:06 -0400 (EDT) From: Jerry McAllister Message-Id: <200506061427.j56ER6jZ019984@clunix.cl.msu.edu> To: dnelson@allantgroup.com (Dan Nelson) Date: Mon, 6 Jun 2005 10:27:06 -0400 (EDT) In-Reply-To: <20050606141635.GK255@dan.emsphone.com> 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 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:27:17 -0000 > > In the last episode (Jun 06), Jerry McAllister said: > > > 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. > > Correct. Each primary returns 'true' or 'false', and the first 'false' > primary causes process to end for that file. > > OPERATORS > The primaries may be combined using the following operators. The > operators are listed in order of decreasing precedence. > [...] > expression -and expression > expression expression > The -and operator is the logical AND operator. As it is > implied by the juxtaposition of two expressions it does not > have to be specified. The expression evaluates to true if > both expressions are true. The second expression is not > evaluated if the first expression is false. Unfortunately, that kind of precise operational language blows right by someone with not much experience with such things. That is true of many points of documentation. It often takes some more conversational type language to unlock the official language. ////jerry > > -- > Dan Nelson > dnelson@allantgroup.com >