[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there another way to find a file that was created|modified|access
Re: Is there another way to find a file that was created|modified|accessed before a certain time?
Wed, 5 Feb 2020 15:10:02 -0500
On Wed, 5 Feb 2020 at 15:00, Jeff Silverman <address@hidden> wrote:
> I would like to get a list of all of the files modified between 2 dates. I
> see that there is a -newermt DATE predicate, which works as documented and
> which is half the problem. But I do not see an -oldermt DATE predicate.
> In reading the archives, I see that there was a discussion of a -mbefore
> predicate, but it isn't recognized in find version 188.8.131.52-235f in ubuntu
> The best workaround that I have seen is to use the ddiff command in the
> dateutils package, and use that with the -mtime N predicate. Is there a
> better solution? Seems like a kludge to me.
You can get the effect of -oldermt DATE with -not -newermt DATE. If
you care about the exact boundaries then you'll have to increase DATE
by a nanosecond or so.
> Thank you