verifying files

Kurt Granroth plug-discuss at granroth.org
Sat Sep 17 15:06:50 MST 2005


On Sep 17, 2005, at 12:59 PM, Craig White wrote:
> 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.
>
> so I thought I could md5sum a directory tree but it only works on
> files. ;-(

Well, if all the files are supposed to be the same other than their  
names, why not try something like this:

$ cd orig_directory
$ md5sum * | cut -d ' ' -f 1 | sort > ~/orig.sums
$ cd new_directory
$ md5sum * | cut -d ' ' -f 1 | sort > ~/new.sums
$ diff ~/orig.sums ~/new.sums

That won't tell you everything but it will tell you a lot.  If, for  
instance, all the files ARE the same (just renamed), then there  
shouldn't be any differences.  If only a few lines are different,  
then you can probably manually track down those files.  If a lot of  
lines differ, then there was some serious problems with your export.


More information about the PLUG-discuss mailing list