Sorry I missed the beginning of the thread, but am I right in assuming you
want to delete a single known file after a successful rsync? My simple
solution wouldn't be to use rsync at all for the delete ;) I've done similar
things and have just used the return value to determine if it's safe to
delete the file or not. Bourne shell example:

rsync -whatever /src/file u@desthost:/dest 
if [ "$?" -eq "0" ]; then
 rm /src/file
else
 echo "Rsync wasn't successful, not deleting"
fi

If you're using rsync to keep a remote source up-to-date with a local source
or something similar using --delete to remove out-of-date files, this isn't
the solution - rsync is, and I'm sorry for wasting your time ;)

> -----Original Message-----
> From: Shez [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 07, 2000 5:49 AM
> To: Multiple recipients of list RSYNC
> Subject: Re: Using rsync to delete a single file
> 
> 
> Yes I've tried --delete :)
> It works fine if you specify an existing directory, but I 
> don't want the
> overhead of scanning whole directory tree's when I already 
> know what file I
> want to delete.  Currently I'm using --delete -a on the whole 
> home directory,
> but when you start getting to more than a few thousand updates a day a
> significant amount of memory and I/O goes on building up the 
> directory lists :(
> 
> Cheers for your suggestion :)
> Seeya
> Shez
 

Reply via email to