Discussion:
command line tool for bulk compare ?
(too old to reply)
Lars Erdmann
2016-06-16 04:25:05 UTC
Permalink
Anyone have a suggestion on a compare tool that can compare large
amounts of files ? It's sufficient to give a "compares: yes/no" answer
for each compared file couple.

The "comp.com" that comes with OS/2 is fairly ok as such but
unfortunately it always asks for user input after each run.
(Or does anyone know how to pipe an answer into the tool ?).

I need something that I can run over thousands of files without being
interrupted or asking for user input. Ideally it writes its compare
results to STDOUT (so that I can pipe it into a file) or directly into a
file.


Lars
Lars Erdmann
2016-06-16 05:28:12 UTC
Permalink
Ok, I now found out that:

echo N | comp sourcedir\file1.foo targetdir\file1.foo

allows comp.com to finish without any user input.
Nonetheless a compare tool working on whole directory trees would be great.

Lars
Post by Lars Erdmann
Anyone have a suggestion on a compare tool that can compare large
amounts of files ? It's sufficient to give a "compares: yes/no" answer
for each compared file couple.
The "comp.com" that comes with OS/2 is fairly ok as such but
unfortunately it always asks for user input after each run.
(Or does anyone know how to pipe an answer into the tool ?).
I need something that I can run over thousands of files without being
interrupted or asking for user input. Ideally it writes its compare
results to STDOUT (so that I can pipe it into a file) or directly into a
file.
Lars
Steven Levine
2016-06-16 19:51:04 UTC
Permalink
On Thu, 16 Jun 2016 05:28:12 UTC, Lars Erdmann <***@arcor.de>
wrote:

Hi Lars,
Post by Lars Erdmann
Nonetheless a compare tool working on whole directory trees would be great.
Have tried diff yet?

diff --brief --recursive --binary dir1 dir2

may be good enough for what you need.

Steven
--
---------------------------------------------------------------------
Steven Levine <***@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------
Lars Erdmann
2016-06-16 19:59:36 UTC
Permalink
Ok, thanks. I'll have a look at it.

Lars
Post by Steven Levine
Hi Lars,
Post by Lars Erdmann
Nonetheless a compare tool working on whole directory trees would be great.
Have tried diff yet?
diff --brief --recursive --binary dir1 dir2
may be good enough for what you need.
Steven
t***@antispam.ham
2016-06-28 04:14:45 UTC
Permalink
Post by Lars Erdmann
Anyone have a suggestion on a compare tool that can compare large
amounts of files ? It's sufficient to give a "compares: yes/no" answer
for each compared file couple.
I wrote a program a long time ago that I named "rcomp" for "recursive
comp". Haven't used it in a while, though my recollection is that it
was invoked with something like "rcomp C: D:" and it would compare the
entire directory tree. The log file "rcomp.log" would note if it
encountered a file in the first drive letter that didn't exist in the
second drive letter, and it would skip files of zero length. You could
even use a command line like "rcomp C: D:\Backup" and the full pathname
on C: would get appended to D:\Backup to compare the files.

For better or worse, I wrote it to read whole files into memory, so
it's limited to file sizes of about 1 GB, assuming you have 2 GB of
physical memory into which the two files can be loaded.

Unlike the system's comp, different file sizes won't prevent the
comparison, but it will note the difference in the log file.

Sound useful for what you have in mind?
Lars Erdmann
2016-06-28 07:15:18 UTC
Permalink
Thanks for responding.
The suggested "diff --brief --recursive --binary" worked fine for me.
However the largest file to compare was only around 718 MBytes,
therefore I did not run into any file size problem.

Lars
Post by t***@antispam.ham
Post by Lars Erdmann
Anyone have a suggestion on a compare tool that can compare large
amounts of files ? It's sufficient to give a "compares: yes/no" answer
for each compared file couple.
I wrote a program a long time ago that I named "rcomp" for "recursive
comp". Haven't used it in a while, though my recollection is that it
was invoked with something like "rcomp C: D:" and it would compare the
entire directory tree. The log file "rcomp.log" would note if it
encountered a file in the first drive letter that didn't exist in the
second drive letter, and it would skip files of zero length. You could
even use a command line like "rcomp C: D:\Backup" and the full pathname
on C: would get appended to D:\Backup to compare the files.
For better or worse, I wrote it to read whole files into memory, so
it's limited to file sizes of about 1 GB, assuming you have 2 GB of
physical memory into which the two files can be loaded.
Unlike the system's comp, different file sizes won't prevent the
comparison, but it will note the difference in the log file.
Sound useful for what you have in mind?
Continue reading on narkive:
Loading...