[X4U] Compare folders

John Daschbach jldasch at mac.com
Tue Mar 14 22:45:17 PST 2006


Sorry, I was thinking about a different problem.  I did assume you'd  
cd'd to the correct dir.  I sometimes use either mv -i or mv -n after  
I've untared a work set from one machine to another and I want to  
update machine2 with any new (new names) files from machine1.  I'm  
only concerned that any new files on machine1 are copied to machine2,  
I don't want to clobber files with the same name.  (often files with  
the same name have machine specific paths hardcoded in them, e.g.  
jobs submitted to LoadLeveler).   I suppose cp -n is the more obvious  
choice, and with -R it works as a pseudo sync solution.  Neither  
approach handles a real sync where  files which exist in both trees  
at the same point are compared for modification times and the newer  
copy is used on both trees.

That said, I do real synchronization every night on my Macs between  
the main disc and a "mirror", both at home and at work, using  
ChronoSync.  I have found this to be an excellent package.  One nice  
feature is that it will awake your Mac from sleep to run, and using  
it's scheduler it wakes, runs, and exits.  I have this run every night.

-John


On Mar 11, 2006, at 11:43 AM, B. Kuestner wrote:

>> If the folders do not have children (no sub Folders) then the  
>> easiest way make sure Dir2 has every file in Dir1 is to use mv
>>
>> e.g.
>>
>> mv -i * ../Dir2/
>
> I assume that at first you do "cd Dir1". After that this command  
> will move any file from Dir1 to Dir2 unless the file already exists  
> in Dir2. In that case it asks whether you want to move or not. I am  
> not sure how that is supposed to help with either synchronizing two  
> folders or comparing folder so that they are in sync. Maybe that  
> can be clarified.
>
> Björn_______________________________________________
> X4U mailing list
> X4U at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x4u
>
> Listmom is trying to clean out his closets! Vintage Mac and random  
> stuff:
>         http://search.ebay.com/_W0QQsassZmacguy1984



More information about the X4U mailing list