Hi Linda,
On 11/19/18 3:59 AM, L A Walsh wrote:
> I was doing a "diff -rq ./src ./dev
> to find areas of 'dev' that hadn't been rolled into src when I
> realized some patches had gone into src directly. Rather than
> just telling me files "differed", it really would be useful,
> sometimes, to know which of two files under a recursive
> tree-diff was newer, older or had the same last mtime.
>
> Is there a switch for this in diff that would accomplish this,
> or does this fall into an RFE?
you reached the GNU findutils mailing list, so you might get
better help from the GNU diffutils mailing list.
Re. the question, i.e., timestamps:
I'm not sure what you exactly want, but the -u option gives it
in the header lines ("---" / "+++"):
$ stat -c "%n %y" f1 f2
f1 2017-09-10 16:12:02.000000000 +0200
f2 2018-11-19 02:42:03.793387426 +0100
$ diff -u1 f1 f2 | head -n2
--- f1 2017-09-10 16:12:02.000000000 +0200
+++ f2 2018-11-19 02:42:03.793387426 +0100
Have a nice day,
Berny