UFS Comparing directories

Following the filesystem errors I had in Thread 89619 I would like to compare the restored filesystem with the partial backup I was able to make to see what if any files were unable to be restored.

Can anyone suggest how I should go about this? I first thought is to use diff(). Is there anything else I should consider?
 
That looks like a handy dandy utility!
It's super useful, and included with the base OS :D

If you ever muck up permissions of the base OS you can use the files in /etc/mtree/ to restore those.
 
But if the hashes are the same, still the files could be different ...
True. Collisions can certainly happen but with SHA256 they are highly unlikely. Want to be really sure, use two or more different hashing algorithms. The chance of all hashes having the same collision is infinitesimally small.
 
If you add size as additional comparison element, you probably are safe; creating a hash collision in two different algorithms while maintaining the same size would be quite the feat.
I suppose some nation state is thinking "challenge accepted" as I type this... :)
 
The chance of all hashes having the same collision is infinitesimally small.

Even using many hashes, you are mapping an infinite set to a finite one.

Only the chance of finding a collision is very small, but the probability that two files with the same hash
are equal should be 0 or almost 0.
 
Back
Top