Unix 终端错误 - "cp: the -R and -r options may not be specified together."



我有一个bash脚本运行在os-x unix上,上面的命令:

cp -avr source destination

结果如下错误:

cp: the -R and -r options may not be specified together.

当我删除a标志,它工作正常,没有错误。

这个错误的原因和含义是什么?

谢谢,

查看cp手册页:

————档案与-dR——preserve=all

相同

-R, -R ,——recursive递归复制目录

通过指定-a,你可以说:

cp -dRvr --preserve=all source destination

你有-R-r,因为这两个是相同的,它警告你。要解决这个问题,只需删除-r:

cp -av source destination

相关内容

最新更新