Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2005 09:56:08 -0400 (EDT)
From:      Francisco Reyes <lists@natserv.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        FreeBSD Questions List <questions@freebsd.org>
Subject:   Re: Looking for files older than n number of days?
Message-ID:  <20050606095343.D86876@zoraida.natserv.net>
In-Reply-To: <20050606040941.GJ255@dan.emsphone.com>
References:  <20050605215422.O79500@zoraida.natserv.net> <20050606022823.GI255@dan.emsphone.com> <20050605235701.Q80154@zoraida.natserv.net> <20050606040941.GJ255@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 5 Jun 2005, Dan Nelson wrote:

>> I ran it on a directory and was surprised to find that both -5 AND +5
>> listed a file from February. :-(
>
> -5 definitely should not, and doesn't on my system.  It should be
> interpreted as "less than 5 days from midnight tonight".

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050606095343.D86876>