Re: Check if files equal

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 7 Jul 2002, at 1:51, 10963508 at europeonline.com wrote:

> 
> What is the fastest way of checking if two very large files (~500 MB) are
> equal?
> I was thinking about this:
> -name
> -size
> -date last modified
> -pick about 10 random positions and check if bytes at those positions in
> both files match.

I would not trust those tests at all.

> Is there any better and faster way that I'm not aware of?

Open file
while not eof do
Read them in, one buffer size at a time, 
compare, 
if not equal { tell me it's not equal, abort}
end while

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu