views:

50

answers:

4

Hi

I have written some piece of code that copies chunks of big files to a remote machine. Now I would like to figure out if I really copied all the bits into the right place by comparing those two files on a byte-per-byte basis. Is there some tool for windows that allows me to do that? I guess Linux has such a tool already built in, doesn't it?

Many thanks, Paul

+2  A: 

Comparing "byte-per-byte" is probably excessive. That would be equivalent to copying the file again. Build a checksum for each copied portion and compare the checksum value. You can also use the unix command cksum. You can get the same thing on windows with the CoreUtils package.

Abtin Forouzandeh
Depends on the intent. For an integrity verifier on important files a hash might not be enough.
Vinko Vrsalovic
#Vinko, you are technically correct. But applications needing a full bit-by-bit comparison are uncommon. Unless the developer expects the system to be attacked or large amounts of money are involved, i wouldn't think it worth it.
Abtin Forouzandeh
A: 

Windows:

comp

Linux:

cmp, diff
Chen Levy
How long has comp been in windows? I've just tried in my windows 7 box. Thank you!
Preet Sangha
`comp` was already included in MS-DOS (and probably other DOS variants as well).
Bombe
wow - I must have forgotten about it years ago!
Preet Sangha
A: 

There are tonnes of tools that provide that functionality. Just google for one. I personally use Beyond Compare which is outstanding. However it costs but there are others such as windiff which are free.

Preet Sangha
Thanks, windiff looks good to me!
A: 

I think you are re-writing

Deltacopy

http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp

Jaydee