[Tfug] Need help with a complicated command line copy...

Paul Lemmons paul at lemmons.name
Wed Jun 27 15:41:08 MST 2007


-------- Original Message  --------
Subject: Re:[Tfug] Need help with a complicated command line copy...
From: Paul Lemmons <paul at lemmons.name>
To: Tucson Free Unix Group <tfug at tfug.org>
Date: 06/27/2007 03:35 PM


> Hmmmm have not tried this but I think....
> 
> # find /source/directory -type f | xargs -i{} rsync -u "{}" "/dest/dir/{}"
> 
> The find will locate all fles. You can limit the file types with the 
> -name option.
> The xargs program will run the command after it on each file that it finds
> The rsync command will check dates before copy and not overwrite newer 
> files.
> 
> It is not tested but I think it is probably pretty close to what you are 
> saying you want.
> 

Update:

# find /source/directory -type f | xargs -i{} rsync -u "{}" /dest/dir

I just reread the part where you do not want to reserve the directory 
structure.


-- 
Sometimes I wonder.  Were our faith able to stand upright and look 
around, would it be looking down at the mustard seed or standing in awe 
of the height and bredth of it.




More information about the tfug mailing list