rsync --delete not working (no wildcards)

Stewart Jeacocke stewart at
Mon Jan 28 15:02:14 MST 2013


I'm trying to copy some directories with rsync and would like to
delete files from the destination if they no longer exist in the

I'm using the following command:

rsync -v --archive --hard-links --delete --force
--filter=':/.rsync-filter' /opt/ /mnt/backup/opt/

/opt does not contain any files
the destination contains one file

stewart at attobeast:/etc$ ls /mnt/backup/opt/

after running the rsync command I would expect test-file to have been
deleted but it isn't. I'm sure I'm missing something obvious in the
man page that explains this behaviour but I can't figure it out. Can
anyone enlighten me?



More information about the rsync mailing list