Deleting a remote file when deleted locally...
hmerrill at redhat.com
Tue Nov 11 23:56:52 EST 2003
mailinglists at net-virtual.com [mailinglists at net-virtual.com] wrote:
> I have several individual files in a directory that I want to keep
> syncronized. Here's an example:
> Server #1 (host):
> Now of course I can run "rsync -a /tmp/file1 remoteuser at remotehost:/tmp"...
> But, when I delete /tmp/file1 from the host and try to run this it
> complains about /tmp/file1 being non-existant...
> Can I force (or using a more elegant method) make the remote server delete
> an individual file if it no longer exists on the host?... Obviously I do
> not want to rsync the entire directory, I just want that single file to be
Did you notice the --delete option in the rsync manpage? Does
that not do what you want here?
Red Hat, Inc.
More information about the rsync