executable file diff

Daniel R. Levy levy at ttrdc.UUCP
Thu Sep 12 14:09:27 AEST 1985


Please pardon me for posting.  I am having difficulty trying to reach pyuxww
from here (apparently my closest link on this path, via ihnp4) so I post
instead of mail.

To: ltuxa!mgnetp!ihnp4!mhuxn!mhuxr!ulysses!gamma!pyuxww!pyuxv!rruxa!rruxe!jpage
Subject: Re: executable file diff
In-reply-to: your article <289 at rruxe.UUCP>

In article <289 at rruxe.UUCP>, jpage at rruxe.UUCP (J. H. Page) writes:
>any unix-wizard out in net land ever come up with a reliable(workable)
>way to compare(diff) two executables presumably compiled from the same
>src???
>i'm running SV.0.5 on 780's and 3B20's.
>thanks for your help,
>jim page
>also any ideas on how to compare .o files as well???

No wizard I, but methinks this is not a tough task.

If you are just interested in knowing if they are the same or not (without
wanting to know WHAT is different) first check the obvious--are they the same
size (as told by ls -l at first, then via the size command)?  Warning--if one
of the files is "stripped" and the other is not (use the "file" command to
determine this) make a stripped copy of the one that is not and use that to
compare with the other.   This test passed, try the "sum" command on both
the files which should come up with identical checksums if they are the same.
If you are REALLY paranoid, do an "od" on each one, save the results, and do
a conventional "diff" between those results.

This could obviously be put into a little shell script by anyone who cared to.
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer, my pets, my plants, my boss, or the
| at&t computer systems division |  s.a. of any computer upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!ihnp4!ttrdc!levy
                                      or: ..!ihnp4!iheds!ttbcad!levy



More information about the Comp.unix.wizards mailing list