Can rsync delete file without receive?

Wayne Davison wayned at samba.org
Sun Dec 19 16:04:02 GMT 2004


On Fri, Dec 17, 2004 at 05:00:04PM +0800, kevinwatt wrote:
> I want client could delete the files which are don't exist on
> sender.  but without to receive the new files back.

You could run rsync in --dry-run mode and pipe the output to a
script that will notice all the "deleting" lines and remove the
files that were mentioned.  There is no way for rsync to do the
deletions itself without also asking it to transfer files.  If,
however, you want rsync to update existing files, you could use
the --existing option instead of --dry-run.

..wayne..


More information about the rsync mailing list