From owner-freebsd-questions@FreeBSD.ORG Mon Jan 2 16:20:17 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 227BA16A41F for ; Mon, 2 Jan 2006 16:20:17 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay03.roc.ny.frontiernet.net (relay03.roc.ny.frontiernet.net [66.133.182.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id B39DC43D48 for ; Mon, 2 Jan 2006 16:20:06 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from filter07.roc.ny.frontiernet.net (filter07.roc.ny.frontiernet.net [66.133.183.74]) by relay03.roc.ny.frontiernet.net (Postfix) with ESMTP id EE039359564 for ; Mon, 2 Jan 2006 16:20:05 +0000 (UTC) Received: from relay03.roc.ny.frontiernet.net ([66.133.182.166]) by filter07.roc.ny.frontiernet.net (filter07.roc.ny.frontiernet.net [66.133.183.74]) (amavisd-new, port 10024) with LMTP id 07390-05-82 for ; Mon, 2 Jan 2006 16:20:05 +0000 (UTC) Received: from blacklamb.mykitchentable.net (67-51-143-222.dsl1.elk.ca.frontiernet.net [67.51.143.222]) by relay03.roc.ny.frontiernet.net (Postfix) with ESMTP id B1C94359543 for ; Mon, 2 Jan 2006 16:20:05 +0000 (UTC) Received: from [192.168.1.3] (unknown [192.168.1.3]) by blacklamb.mykitchentable.net (Postfix) with ESMTP id C3C1AAE946 for ; Mon, 2 Jan 2006 08:20:04 -0800 (PST) Message-ID: <43B952A3.4080800@mykitchentable.net> Date: Mon, 02 Jan 2006 08:19:47 -0800 From: Drew Tomlinson User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.2 (20050629) at filter07.roc.ny.frontiernet.net Subject: 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:20:17 -0000 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 {} \; 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