From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id D28BA27C4B for ; Thu, 16 May 2024 21:52:12 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id C880C43AAD; Fri, 17 May 2024 05:52:05 +1000 (AEST) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by minnie.tuhs.org (Postfix) with ESMTPS id 2C3CC43AAC for ; Fri, 17 May 2024 05:51:58 +1000 (AEST) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-51fc01b6fe7so1398088e87.0 for ; Thu, 16 May 2024 12:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715889116; x=1716493916; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AxyoWQQmqxq7tD72Kk/39zrwZACBhN/M/3VjH+5eI48=; b=YzlB9eCdL3GdaGicoBO9uFYTscyOc5wmDzLMJWB15ycDcuC4w5StcSCpGKKK4DFg3C 9cteEnAGE0rSMIzuvPwlhj60qTI7CSVsaf1hBMVWlsFN9GMwhBnvJ2w9kWEbFinEvmtK vqVqIPQxiQLKn1/zHBnG1Og12RPXX4+nG7iKcdsmGghkYpHw1T6tVR59KKOGqu2bVxuI aouU5GtlSXCd92owVs0xhinoGaiWCR8RAO8ys3o7vS5b13wmJ0Lw9qzCAau1HHwoTLZj edsWnWOAv6KvreXHX85WjlI5FookFla/I13HA4c0FXi3XVlOOgVcBgrvo5/A4qy9X7Pq ChlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715889116; x=1716493916; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AxyoWQQmqxq7tD72Kk/39zrwZACBhN/M/3VjH+5eI48=; b=ETHhSjFJCDKPMw8fvor1zC6Ol7GkF7IPUbdUzMPMQ17iXCRSOdlL6JSPORNcNfjtXt YyIsifbfE1u3jV/bw9a96BL+gMsgMl2BFa2XsJY0Pcc3bK5feWbRP9TmokMYu/nFHLgp XQmcGyjOmPL0NVGPIj/cMqf4W3MiqtTTSxyng8GJTF+zf0q5i5L4x/3awXwbNiSerCrZ pI1XGNtUTL0kanCLIKtnVZtsAmi/H7r3Iu1bhdevD5cfHzyUGdk9SKCNjvBdzkmLSe5K GcE0wW7BiKiee42qle8a2gExKUNv8a3A3pesNrMFUrtyAp0Pzsa7ZDmwnnE9QpU0IrdF 2KYQ== X-Forwarded-Encrypted: i=1; AJvYcCVJKm0oWuX35r2JPlCLJhdm00jt8pBD9u4MhfPasfNOSMNsxrAZR5mKEemaPkA5LZGjBlPIEFac77/1ZELn X-Gm-Message-State: AOJu0YzrLAR4KD+VUi9yz5uaZ5wkFbljsPVzI3kcVcGLZL/CV9tgfVik PVxwMjr7GVLm78zRGRxOWjWQeZKsU1Lj7HA5lvyW0PINbK5f4CiVsVo6zD0jlEgvfuXQfbrrUrD n52+lYEySgtTQvNaJ6KTEN3Es8D8= X-Google-Smtp-Source: AGHT+IH+fvWEMKBzDGWaq+bVS5JHy6dIEVILz7w1clIQNBMIgYZF8J0aWPkgGx8eh/Mk2Yh5FxIvqABEeNr+k9kgqXw= X-Received: by 2002:ac2:4c85:0:b0:51d:1c86:a274 with SMTP id 2adb3069b0e04-5221017775amr12205309e87.34.1715889116035; Thu, 16 May 2024 12:51:56 -0700 (PDT) MIME-Version: 1.0 References: <202405160651.44G6pi8G018059@freefriends.org> <20240516073351.267351FAE3@orac.inputplus.co.uk> <202405160901.44G91CN0007274@freefriends.org> In-Reply-To: From: Marc Donner Date: Thu, 16 May 2024 15:51:45 -0400 Message-ID: To: Skip Tavakkolian Content-Type: multipart/alternative; boundary="0000000000003c47b50618979127" Message-ID-Hash: SBBWS6MADAKB236ZXBGEYD4IIAEFUNQA X-Message-ID-Hash: SBBWS6MADAKB236ZXBGEYD4IIAEFUNQA X-MailFrom: marc.donner@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tuhs@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Be there a "remote diff" utility? List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000003c47b50618979127 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If I recall correctly, there is a combination of flags to rsync that will generate a report on a file, a set of files, or a set of directories to tell if they are different. I seem to recall DPK or RCT doing something clever with rsync and cksum to get this sort of result without having to stream a lot of data across the long-haul network back in the day. Best, Marc =3D=3D=3D=3D=3D nygeek.net mindthegapdialogs.com/home On Thu, May 16, 2024 at 2:51=E2=80=AFPM Skip Tavakkolian wrote: > To add to Ron's post, Plan 9's cpu exports the origination's namespace to > the destination; by convention it is mounted on /mnt/term at destination. > > host1% cpu -h host2 > host2% diff file2 /mnt/term/usr/me/file1 > > > On Thu, May 16, 2024 at 10:09=E2=80=AFAM ron minnich = wrote: > >> " The 9import tool allows an arbitrary file on a remote system, with the >> capability of running the Plan 9 exportfs(4) service, to be imported int= o >> the local name space. Usually file is a directory, so the complete file >> tree under the directory is made available." >> https://9fans.github.io/plan9port/man/man4/9import.html >> >> 9import host1 / /tmp/host1 >> 9import host2 /tmp/host2 >> diff /tmp/host1/a/b/c /tmp/host2/a/b/c >> (or whatever command you want that works with files. No need for stuff >> like 'rdiff' etc.) >> >> stuff you take for granted on some systems ... >> >> I have the plan 9 cpu command working (written in Go) and I think it's >> time I get import working more widely, it's just too useful. >> >> On Thu, May 16, 2024 at 2:01=E2=80=AFAM wrote: >> >>> Ralph Corderoy wrote: >>> >>> > > Maybe >>> > > >>> > > diff -u <(ssh host1 cat file1) <(ssh host2 cat file2) >>> > >>> > This is annoyingly noisy if the remote SSH server has sshd_config(5)'= s >>> > =E2=80=98Banner=E2=80=99 set which spews the contents of a file befor= e authentication, >>> > e.g. the pointless >>> > >>> > [....] >>> > >>> > It appears on stderr so doesn't upset the diff but does clutter. >>> >>> All true, I didn't think about that. >>> >>> > And discarding stderr is too sloppy. >>> >>> But the author of a personal script knows his/her remote machines >>> and can decide if >>> >>> diff -u <(ssh host1 cat file1 2>/dev/null) <(ssh host2 cat file2 >>> 2>/dev/null) >>> >>> is appropriate or not. >>> >>> My main point was that the problem is easily solved with a >>> few lines of shell, so no need for a utility, especially one >>> written in C or some other compiled language. >>> >>> Thanks, >>> >>> Arnold >>> >> --0000000000003c47b50618979127 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If I recall=C2=A0correctly, there is a combination of fla= gs to rsync that will generate a report on a file, a set of files, or a set= of directories to tell if they are different.

<= /div>
I seem to recall DPK or RCT doing something clever w= ith rsync and cksum to get this sort of result without having to stream a l= ot of data across the long-haul network back in the day.
<= br>Best,


On Thu, M= ay 16, 2024 at 2:51=E2=80=AFPM Skip Tavakkolian <fariborz.t@gmail.com> wrote:
To add to Ron's post, Plan 9's cpu exports the= origination's=C2=A0namespace to the destination; by convention it is m= ounted on /mnt/term at destination.

host1% cpu -h host2<= br>
host2% diff file2 /mnt/term/usr/me/file1

<= /div>

On Thu, May 16, 2024 at 10:09=E2=80=AFAM ron minnich <rminnich@gmail.com>= wrote:
" The 9import tool = allows an arbitrary file on a remote system, with the capability of running= the Plan 9 exportfs(4) service, to be imported into the local name space. = Usually file is a directory, so the complete file tree under the directory = is made available."
https://9fans.github.io/plan9port/m= an/man4/9import.html

9import host1 / /tmp/host1<= /div>
9import host2 /tmp/host2
diff /tmp/host1/a/b/c /tmp/hos= t2/a/b/c
(or whatever=C2=A0command you want that works with files= . No need for stuff like 'rdiff' etc.)

stu= ff you take for granted on some systems ...

= I have the=C2=A0plan 9 cpu command working (written in Go) and I think it&#= 39;s time I get import working more widely, it's just too useful.=C2=A0=

On Thu, May 16, 2024 at 2:01=E2=80=AFAM <arnold@skeeve.com> wrote:
Ralph Corderoy <ralph@inputplus.co.uk> wrote:

> > Maybe
> >
> >=C2=A0 =C2=A0 =C2=A0diff -u <(ssh host1 cat file1) <(ssh hos= t2 cat file2)
>
> This is annoyingly noisy if the remote SSH server has sshd_config(5)&#= 39;s
> =E2=80=98Banner=E2=80=99 set which spews the contents of a file before= authentication,
> e.g. the pointless
>
> [....]
>
> It appears on stderr so doesn't upset the diff but does clutter.
All true, I didn't think about that.

> And discarding stderr is too sloppy.

But the author of a personal script knows his/her remote machines
and can decide if

=C2=A0 =C2=A0 =C2=A0diff -u <(ssh host1 cat file1 2>/dev/null) <(s= sh host2 cat file2 2>/dev/null)

is appropriate or not.

My main point was that the problem is easily solved with a
few lines of shell, so no need for a utility, especially one
written in C or some other compiled language.

Thanks,

Arnold
--0000000000003c47b50618979127--