verifying files

der.hans PLUGd at LuftHans.com
Sat Sep 17 14:08:50 MST 2005


Am 17. Sep, 2005 schwätzte Craig White so:

> I'm thinking that I don't entirely trust what I 'exported' from my iPod
> and want to check it against the music data from my Windows
>
> What I want to compare is the entirety of the music data - though the
> file names and folder names are different, the data within them should
> be entirely unchanged.

Are they different in a way that can easily be scripted? e.g.
'My_Song.ogg' vs. '01. My Song.ogg'?

Have the id3 or whatever tags changed? If they have you likely have to
strip them out to compare everything.

> so I thought I could md5sum a directory tree but it only works on
> files. ;-(

Yup. I don't know of a tool that would accurately do dirs. When going from
one filesystem to another it's really not going to work without a lot of
work, I think.

If you have space you might be able to get away with catting all of the
music files into one file and then comparing the md5sum of it to the other
one.

Theoretically that should work. I've just never tried it :).

>
> The data amount should be slightly over 3 Gb in both cases...
>
> [root at srv1 home]# du -s /home/music
> 18759612        /home/music
>
> [root at srv1 home]# du -s /home/samba/profiles/craig/My\ Documents/My\
> Music/iTunes/iTunes\ Music
>
> 18776304        /home/samba/profiles/craig/My Documents/My
> Music/iTunes/iTunes Music
>
> Not the same ;-(

Considering the filesystem differences, that's pretty close. In fact being
that close makes me suspicious. Block size differences can be the
difference as well because dirs get the min blocksize for the filesystem.
Also, if one's been around for a while and had things added and removed
the directory block size will be large enough to hold the most files it's
ever had.

ciao,

der.hans

> probably indicates a problem
>
> Is there some absolute way to computer a checksum on a directory tree to
> compare the binary contents?
>
> Craig

-- 
#  https://www.LuftHans.com/
#  When you are tired of choosing the lesser of two evils,
#  Vote Cthulhu for President!


More information about the PLUG-discuss mailing list