Date: Mon, 2 Jan 2006 11:37:08 -0500 From: Kevin Brunelle <kruptos@mlinux.org> To: freebsd-questions@freebsd.org Cc: Drew Tomlinson <drew@mykitchentable.net> Subject: Re: Find Syntax Message-ID: <200601021137.08809.kruptos@mlinux.org> In-Reply-To: <43B952A3.4080800@mykitchentable.net> References: <43B952A3.4080800@mykitchentable.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 02 January 2006 11:19, 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 {} \;
>
> 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?
Have you tried
find . -mtime +3w
I don't know about the other syntax but this is what I find to be the
simplest.
-Kevin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601021137.08809.kruptos>
