comparing two filesystems with different newfs values ?

Jason Harris jharris at widomaker.com
Tue Oct 16 08:13:06 PDT 2007


On Sun, Oct 14, 2007 at 10:01:51PM -0700, Juri Mianovich wrote:

> The bottom line is, I want to be SURE that all of the
> data is transferred before I scrap system A ... rsync
> is telling me all the data is there, because when I
> re-run it, nothing new gets transferred ... but I
> really want to "prove" it by looking at the total file
> size ... and I can't seem to do that currently.

If you want files and their sizes only, try:

  %find . -type f -ls | awk '{print $7 "\t" $11}' | tee `hostname`

then "sort +1" them and diff or "sort -m +1 ... | uniq -u" to find
the unique entries.

If you have the time to hash all that data, try:

  %find . -type f | xargs /sbin/md5 (or sha1/rmd160/sha256) | tee ...

to make sure the copied files hash identically.

"rsync -c" will use md4 hash equality instead of size and modtime
equality to pronounce files "indentical."  But, if you're going to
hash the files, you might as well use sha1 or rmd160 at minimum.

-- 
Jason Harris           |  NIC:  JH329, PGP:  This _is_ PGP-signed, isn't it?
jharris at widomaker.com _|_ web:  http://keyserver.kjsl.com/~jharris/
          Got photons?   (TM), (C) 2004
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 313 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20071016/c164f174/attachment.pgp


More information about the freebsd-fs mailing list