[Gambas-user] Binary compare of files?

nando nando_f at ...951...
Mon Oct 20 17:23:07 CEST 2008


The code was shown in an earlier email where
something like:
loop
  read string A from file 1
  read string B from file 2
  see if they're the same or not
end loop

An md5 or sha for 1T is quite the time consumer, especially if
you're trying to compare snapshots.
My personal preference is RAID1  and once fully sync'd, then
fail and remove the drive. It's as good as it can be.
Then add a different drive and resync it.




---------- Original Message -----------
From: "Kari Laine" <klaine8 at ...626...>
To: nando_f at ...951..., "mailing list for gambas users"
<gambas-user at lists.sourceforge.net>
Sent: Sun, 19 Oct 2008 19:40:45 +0300
Subject: Re: [Gambas-user] Binary compare of files?

> On Sun, Oct 19, 2008 at 7:02 AM, nando <nando_f at ...951...> wrote:
> 
> > You want to use the code below,
> 
> Hi nando,
> 
> Ok what code you mean?
> 
> > but use a large block size
> > like 8192 or 32768.  It doesn't have to be a perfect binary size.
> > I suggest not to use SHA or MD5 because if you're reading in
> > the files to compute SHA or MD5, you might as well forget
> > wasting the time to compute and simply compare the strings.
> > It will be faster.  Plus MD5 is a one-way digest and it is
> > possible to get one identical answer digesting two different
> > strings - although highly unlikely.  SHA and MD5 are candidates
> > for scenario where the two files cannot be compared directly, so
> > the copy is digested and compared with a copy of the SHA or MD5.
> >
> >
> >
> Thanks for comment. I am at the moment testing in practice how well MD5SUM
> and SHA512SUM distributes fingerprints. I have had problems with the testing
> so it is taking time. At the moment I try to checksum 1000GB of files and
> see if I get any collisions. As I told before I cannot compare the files
> itself because I have many hard disks which contains backups, which are not
> connected to machine all the time. So I must use some kind of checksumming.
> I was also thinking that I could take little snapshots of files into the
> database and use that in addition to checksums. The whole idea of this
> project is to move backups from hard disks to DVDs to be able to reuse the
> harddisks. Also idea is to have a database to know what I have and where.
> Also there is lot of duplication in disks I dont't want same data backed up
> many times on DVDs. By the way does anyone have an idea how long lived a dvd
> is?
> 
> Best Regards
> Kari Laine
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list