file check

Christopher Jones c.jones at
Tue Jul 15 13:05:12 BST 2008

<gratitude>Thanks for the help!</gratitude>

I've just optimised the MySQL database that some of you helped me to  
speed up a few weeks ago. I had a (data only) dump of the database  
before optimisation, and one after. I need to make sure that the  
optimisation hasn't messed up the data in any way, and figured that  
the two dumps should be identical assuming everything is hunky dory.

Of course there could be a flaw in my plan.....


(Standing by with full-body flame-proof armour)

On 15 Jul 2008, at 12:22, Nigel Rantor wrote:

> Peter Corlett wrote:
>> On Tue, Jul 15, 2008 at 11:38:24AM +0100, Nigel Rantor wrote:
>>> Christopher Jones wrote:
>>>> What's the quickest/easiest way to check that two large (~5Gb)  
>>>> files are identical?
>>> Check to see if the indoe's are the same.
>> *grin*
>> You do also get to hope that (st_dev, st_ino) is unique, which is  
>> not at all
>> guaranteed once NFS joins the party.
> Yes, I suppose I should have qualified that they must be on the same  
> filesystem. I only mention it in case the OP was being tricksy  
> rather than really wanting to know how to do it.
>>> Otherwise use cmp, as others have said using a hash is slower than  
>>> cmp,
>>> and doesn't tell you if they're the same, only if they're different.
>> Hashing will however work out quicker for the more typical problem  
>> of having
>> a bunch of files and wanting to know if there are any duplicates.
> Indeed, but this was not what the OP wanted, and is therefore beside  
> the point.
>  n

Gynaecological Cancer Research Laboratories,
UCL EGA Institute for Women's Health,
University College London,
Paul O'Gorman Building,
72 Huntley Street,
London WC1E 6DD
United Kingdom

Telephone: 020 3108 2007

More information about the mailing list