rsync macos 不允许操作并跳过文件删除

rsync macos Operation not permitted and skipping file deletion

如果我在终端中输入以下命令,

sudo rsync -a -u -v -progress --delete --stats -n Externe1/ Externe3/

我收到以下错误:

building file list ... rsync: opendir "/Volumes/Externe1/.Spotlight-V100" failed: Operation not permitted (1)

我能够通过添加 --exclude '.Spotlight-V100' 并删除 --delete-excluded 来解决这个问题。

我还建议忽略 macOS 中的 .DS_Store.fseventsd。这是我当前的默认命令:

rsync -ru --progress --copy-links --delete \
  --exclude '.DS_Store' --exclude '.Spotlight-V100' --exclude '.fseventsd' \
  [SRC] [DEST]