bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question or RFE on diff -r handling non-same files: show new/older w


From: Bernhard Voelker
Subject: Re: question or RFE on diff -r handling non-same files: show new/older when they "differ"
Date: Mon, 19 Nov 2018 08:20:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]