rsync 删除选项不起作用

rsync delete option not working

rsync 没有从目标目录中删除文件,尽管 Adding/modifying 个文件工作正常。

当我使用以下命令时,出现以下错误:

[MS-PROD-FTP]$rsync -rave --del "ssh -i $cert" $Local_Dir/* 

$USER@$Remote_Hostname:$Remote_Dir**

rsync: Failed to exec --del: No such file or directory (2)

rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.6]

下面的命令一执行没有错误,但是目标目录中的文件没有被删除。

[MS-PROD-FTP]$rsync --del -rave  "ssh -i $cert" $Local_Dir/* 

$USER@$Remote_Hostname:$Remote_Dir**

sending incremental file list

sent 136 bytes  received 12 bytes  296.00 bytes/sec
total size is 66  speedup is 0.45

有人可以帮忙吗?

问题是 /*,正确的命令是:

rsync -rave --del "ssh -i $cert" $Local_Dir/ $USER@$Remote_Hostname:$Remote_Dir/

谢谢,