From unknown Sat Jun 14 03:47:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#33427 <33427@debbugs.gnu.org> To: bug#33427 <33427@debbugs.gnu.org> Subject: Status: question or RFE on diff -r handling non-same files: show new/older when they "differ" Reply-To: bug#33427 <33427@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:47:41 +0000 retitle 33427 question or RFE on diff -r handling non-same files: show new/= older when they "differ" reassign 33427 diffutils submitter 33427 L A Walsh severity 33427 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 03:34:23 2018 Received: (at submit) by debbugs.gnu.org; 19 Nov 2018 08:34:23 +0000 Received: from localhost ([127.0.0.1]:59622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOf0h-0004x5-0o for submit@debbugs.gnu.org; Mon, 19 Nov 2018 03:34:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOf0f-0004wr-6y for submit@debbugs.gnu.org; Mon, 19 Nov 2018 03:34:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOf0Z-0001it-F7 for submit@debbugs.gnu.org; Mon, 19 Nov 2018 03:34:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOf0Z-0001il-CH for submit@debbugs.gnu.org; Mon, 19 Nov 2018 03:34:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOf0X-0007lj-Rx for bug-diffutils@gnu.org; Mon, 19 Nov 2018 03:34:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOf0T-0001fV-UC for bug-diffutils@gnu.org; Mon, 19 Nov 2018 03:34:13 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:39996 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOf0T-0001ek-Lb for bug-diffutils@gnu.org; Mon, 19 Nov 2018 03:34:09 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id wAJ8Y5xr046680 for ; Mon, 19 Nov 2018 00:34:07 -0800 Message-ID: <5BF2757D.90607@tlinx.org> Date: Mon, 19 Nov 2018 00:34:05 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: "bug-diffutils@gnu.org" Subject: question or RFE on diff -r handling non-same files: show new/older when they "differ" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) (Reposting on correct list): 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? Thanks! -linda I.e. some examples: currently: > diff -rwq ~/{,w}bin -x RCS -x orig >/tmp/diffs 1) Files bin/dtlog and wbin/dtlog differ 2) Only in bin: dtlog.save For case '1' maybe something like --when-diff=cmp-mtimes,show-relative showing output like: file1-mtime < file2=mtime or --when-same=cmp-owners showing something like: file1-owner: root file2-owner: daemon