我正在对几个不同的系统执行如下命令:
$ rsync -a -v foo@machine.company.com:'/path/to/first/*.log path/to/second.txt' /dest/folder/0007/.
Run Code Online (Sandbox Code Playgroud)
有时 *.log 不存在,这没关系,但是 rsync 会生成以下错误:
receiving file list ... rsync: link_stat "/path/to/first/*.log" failed: No such file or directory (2)
done
Run Code Online (Sandbox Code Playgroud)
有什么办法可以抑制它吗?我能想到的唯一方法是使用包含和排除过滤器,这对我来说似乎是一个 PITA。谢谢!
Jon*_*mar 13
我认为这个问题的答案最好在这个答案中描述:
--ignore-missing-args不幸的是,只有更高版本才有这个功能。我正在使用 rsync 3.0.9 运行 RHEL 7,它似乎没有这个选项。
| 归档时间: |
|
| 查看次数: |
14281 次 |
| 最近记录: |