Generate an MD5 or stronger hash on the file. If anything changes, the hash
changes. I say 'or stronger' because MD5 has been shown to have (extremely
rare) overlaps.

On Mon, Nov 12, 2012 at 4:21 PM, Ruby Student <ruby.student / gmail.com>wrote:

> Team,
>
> I have two large files, about 16 million records each.
> The files are sorted.
> The first 13 characters are used as a key.
> We get an updated file every week.
> We also keep the previous week file.
>
> I need to compare the keys from the new file to the keys on the file from
> last week. If the rest of the records are the same, then I do nothing. If
> the keys matches but the rest of the records are different, I then have an
> update and I will output that record to a new file.
> I was wondering if there is an efficient way to do this in Ruby. Either
> any built-in method or an efficient algorithm which I can implement.
>
> Thank you
>
>
> --
> Ruby Student
>