From owner-freebsd-questions@FreeBSD.ORG Sat Nov 1 07:09:08 2003 Return-Path: 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 E5E1C16A4CE for ; Sat, 1 Nov 2003 07:09:08 -0800 (PST) Received: from blacklamb.mykitchentable.net (207-173-254-228.bras01.elk.ca.frontiernet.net [207.173.254.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DA9243F3F for ; Sat, 1 Nov 2003 07:09:07 -0800 (PST) (envelope-from drew@mykitchentable.net) Received: from bigdaddy (unknown [192.168.1.3]) by blacklamb.mykitchentable.net (Postfix) with SMTP id 0C55D3BF3C6; Sat, 1 Nov 2003 07:08:56 -0800 (PST) Message-ID: <007601c3a08a$180c82f0$0301a8c0@bigdaddy> From: "Drew Tomlinson" To: "Malcolm Kay" , "David Carter-Hitchin" References: <003601c3a088$507817f0$0301a8c0@bigdaddy> Date: Sat, 1 Nov 2003 07:08:55 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 cc: FreeBSD Questions Subject: Re: Help With 'find' Syntax X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2003 15:09:09 -0000 > ----- Original Message ----- > From: "Malcolm Kay" > To: "David Carter-Hitchin" ; "Drew > Tomlinson" > Sent: Friday, October 31, 2003 4:44 PM > > On Sat, 1 Nov 2003 11:34, David Carter-Hitchin wrote: > > Hi Drew, > [snip] > > You may find the following note from man find helpful: > > > > # All primaries which take a numeric argument allow the number to be pre- > > # ceded by a plus sign (``+'') or a minus sign (``-''). A preceding plus > > # sign means ``more than n'', a preceding minus sign means ``less than n'' > > # and neither means ``exactly n''. > > > > So that is why I put a "+" in from of 1024 - to find files over 1024 bytes > > (c). > > > > So in your example below: > > > find /usr \( -mtime 6 -ls -size 100 \) -o \( -ctime 6 -ls -size 100 > > > \) -print > > > > You are trying to find files that are exactly 100 512k blocks in > > size. Admittedly the files you found were not of this size > > At each stage find applies the test argument and passes on files that > remain to the next argument for manipulation. This in the first 'or' branch > everthing that satisfies -mtime 6 is passed on to -ls and thus displayed > before it is filtered by the -size 100 argument. To do what Drew wanted the > -size +100 should be applied *before* the -ls. Thank you. Now I understand. > (It is difficult to see why Drew would want to use both -ls and -print) Because I don't know what I'm doing. :) Thanks for pointing out that this is redundant. Cheers, Drew