Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: an update command



You should probably have a look at rsync.

use this command:

   cd $L          // go into the remote directory you want to sync
   print -l **(.) | rsync -av --dry-run --files-from=- $T $L

If rsync lists only the lists you want to copy remove the --dry-run option. 
Create a backup tar archive if you are unsure.



On Wednesday 19 May 2010 11:31:06 zzapper wrote:
> Hi
> when copying files from a test server to a live server eg
> 
> >cp $T/config.php $L
> 
> I only want to do the copy if the file ALREADY exists in the destination
> directory
> 
> I guess I can hack a script up to do this but how would you do this?

Attachment: signature.asc
Description: This is a digitally signed message part.



Messages sorted by: Reverse Date, Date, Thread, Author