[TUHS] Be there a "remote diff" utility?

Marc Donner marc.donner at gmail.com
Fri May 17 05:51:45 AEST 2024


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
=====
nygeek.net
mindthegapdialogs.com/home <https://www.mindthegapdialogs.com/home>


On Thu, May 16, 2024 at 2:51 PM Skip Tavakkolian <fariborz.t at gmail.com>
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 AM ron minnich <rminnich at 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/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 AM <arnold at skeeve.com> wrote:
>>
>>> Ralph Corderoy <ralph at inputplus.co.uk> 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
>>> > ‘Banner’ 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
>>>
>>>      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
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tuhs.org/pipermail/tuhs/attachments/20240516/4eae607d/attachment.htm>


More information about the TUHS mailing list