From owner-freebsd-questions@FreeBSD.ORG Mon Jan 2 16:35:21 2006 Return-Path: X-Original-To: freebsd-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 D2CED16A41F for ; Mon, 2 Jan 2006 16:35:21 +0000 (GMT) (envelope-from adamnealis@yahoo.co.uk) Received: from web86910.mail.ukl.yahoo.com (web86910.mail.ukl.yahoo.com [217.12.13.62]) by mx1.FreeBSD.org (Postfix) with SMTP id 0D98D43D5C for ; Mon, 2 Jan 2006 16:35:20 +0000 (GMT) (envelope-from adamnealis@yahoo.co.uk) Received: (qmail 78478 invoked by uid 60001); 2 Jan 2006 16:35:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TnFyhLMcEYumjlgdxSTe+MNuiwgVqAiYUV3+drCSrMeMusxZOjv0pOwcHuSbFj/m2reigYmzjilmZ768OpqnK7WZZTHWTIS2x38jGFU/3MtM+L9wDYojg8UpC179vucxUxcBQfsZjSOuw1E2VmVbPzr9e1JvyeJ2NxIoK4ue8nw= ; Message-ID: <20060102163519.78476.qmail@web86910.mail.ukl.yahoo.com> Received: from [84.13.128.174] by web86910.mail.ukl.yahoo.com via HTTP; Mon, 02 Jan 2006 08:35:19 PST Date: Mon, 2 Jan 2006 08:35:19 -0800 (PST) From: Adam Nealis To: Drew Tomlinson , FreeBSD Questions In-Reply-To: <43B952A3.4080800@mykitchentable.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Find Syntax 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, 02 Jan 2006 16:35:21 -0000 --- Drew Tomlinson wrote: > I'm trying to find all files with a modification time older than three > weeks ago. In reading the find man page and searching Google, it seems > the time returned by 'ls -l' is mtime. Thus I construct the following > command: > > find . -not \( -newermt 3w \) -exec ls -l {} \; find has -ls as a built-in, so no need to do -exec ls -l {} \; I'm not sure what you mean by "-newermt" as a flag. Though "-newer mt" would mean "newer than the file mt", in which case the "3w" part is not appropriate. Do these do what you need to? find . -mtime +21 -ls or find -mtime +3w -ls > But it returns files that are newer: > > -rw------- 1 nobody nobody 35292 Dec 29 08:43 totContactedRcvdPeers.rrd > -rw------- 1 nobody nobody 35292 Dec 29 08:43 totContactedSentPeers.rrd > -rw------- 1 nobody nobody 35292 Dec 29 08:33 > ./dc0/hosts/207/106/6/90/pktSent.rrd > > I've tried various placement of the '-not' and the )'s but I can't get > it right. What am I missing? > > Thanks, > > Drew __________________________________ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/