Re: [PATCH] find: -anewer: compare atime with reference file's atime, not mtime

Bernhard Voelker <[email protected]> Wed, 1 Jul 2026 00:13:09 +0200
Newsgroups gmane.comp.gnu.findutils.bugs,gmane.comp.gnu.findutils.patches
Message-ID <[email protected]>
Hi Weixie,

thanks for the patch and sorry for the delay.

On 3/4/26 14:09, Weixie Cui wrote:
> -anewer was incorrectly using mtime for both the reference file and
> the comparison.
what makes you think that this would be incorrect?

The manpage states:

   -anewer reference
      Like -newer, but test if the time of the last access of the current =
file is more
      recent than that of the last data modification of the reference file=
.

and the Texinfo manual is even more clear:

   [...] As such, =E2=80=98-anewer=E2=80=99 is equivalent to =E2=80=98-new=
eram=E2=80=99, =E2=80=98-cnewer=E2=80=99 to =E2=80=98-newercm=E2=80=99,
   and =E2=80=98-newer=E2=80=99 to =E2=80=98-newermm=E2=80=99.

Therefore, I think the behavior is correct and as documented.

Have a nice day,
Berny