Answers:
这应该使您扎实地前进
rsync -RDa0P \
    --files-from=<(find sourcedir/./ -mtime -7 -print0) \
    . user@B:targetdir/
这将复制设备节点,权限,时间戳。我很确定-H选项与--files-from不会正确
rsync -avn --files-from=<(ssh user@A 'find /path/on/A/ -mtime -7 -type f -exec basename {} \;') user@A:/path/on/A/ user@B:targetdir
                    basename您的命令是什么意思?你能解释一下吗?
                    我根据cybertoast的注释编写了此脚本,以将其从远程服务器同步到本地。
您可以通过./script.sh 3或尝试调用脚本./script.sh 3 dry。
#!/bin/bash
TIME=$1
DRYRUN=$2
if [[ -z $TIME ]]; then
  echo "Error: no time argument."
  echo "Please enter the number of days to sync."
  exit 1
fi
if [[ $DRYRUN = "dry" ]]; then
  DRYRUNCMD="--dry-run"
  echo "Dry run initiated..."
fi
rsync -avz $DRYRUNCMD --files-from=<(ssh \
    user@remote "find path/to/data/ \
    -mtime -$TIME ! -name *.mkv -type f \
    -exec ls $(basename {}) \;") \
  user@remote:. .