On Fri, 12 Jan 2001, Brian Vandruff wrote:
>I have two directories on the same systems that I want to keep synced
>up. Only one is ever updated by my users. Rsync needs to update the
>second directory. The problem is that when a file is deleted from the
>first directory rsync does not delete it from the second directory. Why
>not?
>I run rsync from a command line at the moment. Here is the test comment
>I did with two test directories:
>
>     rsync -vau --delete ./dir1/* ./dir2

That should be "rsync -vau --delete ./dir1/ ./dir2". With the * in there, you
are telling rsync to sync the existing files, including any subdirectories, and
delete anything that's deleted. The file you deleted from dir1 will not be
deleted in dir2 because it is not an existing file in dir1. But if you create
dir1/foo/baz, sync it, delete baz, and sync again, baz will be deleted. Without
the * you are telling it to sync the contents of dir1, and it will delete what
is deleted.

phma

Reply via email to