[X4U] Re: Graphical folder comparison

David Ledger dledger at ivdcs.demon.co.uk
Tue Sep 27 10:26:45 PDT 2005


>From: "B. Kuestner" <kuestner at macnews.de>
>>  diff /path/to/first/folder /path/to/second/folder
>
>Cool. I didn't know one could diff two folders. Really nice.
>
>But it's still not going to work here, because iPhoto changes the
>folder structure when you import pictures.

It is scriptable in Perl as a general duplicate file finder.

My initial approach would be to use the 'cksum' command to create a 
checksum string, and stick the pathnames into a hash indexed by 
checksum. When you find a file with a checksum you've already seen, 
you've got a duplicate. There's probably a Perl module that will do a 
checksum so it can all be done within Perl.

David


-- 
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk


More information about the X4U mailing list