[X-Unix] Finder FUBARs another 'move'

Eugene list-themacintoshguy at fsck.net
Sun Dec 9 07:28:20 PST 2007


On Sat, Dec 08, 2007 at 04:17:41PM CST, Craig A. Finseth <fin at finseth.com> wrote:
> TjL <luomat at gmail.com> wrote:
> > 
> > 	...
> >    So I'm thinking of making a shell script that will:
> > 
> >    1) compare two folders
> > 
> >    2) move files from SOURCE to TARGET which don't exist on TARGET
> > 
> >    3) compare files which exist on both.
> >    3a) If identical, delete the copy from SOURCE.
> >    3b) If not identical, move from SOURCE to TARGET
> > 
> > 
> >    But then I thought "I wonder if I'm reinventing the wheel?"
> > 
> >    Any ideas?  Where should I be looking?
> 
> >From your description:
> 
> 	cp -R <source> <target>
> 
> should do the trick.  Read the man page.

If <source> is a directory, -R copies that directory and everything
underneath to the <target> directory.  It does not, however, test for
"existing" files between <source> and <target>.  Read the man page.


-- 
Eugene
http://www.coxar.pwp.blueyonder.co.uk/


More information about the X-Unix mailing list