为什么这会失败(在OS X上)?
$ cp -R dir1 dir2
... # List of all the files in dir1 prefixed with "dir2"
cp: dir2/g: No such file or directory
cp: dir2/h: No such file or directory
cp: dir2/i: No such file or directory
cp: dir2/j: No such file or directory
cp: dir2/k: No such file or directory
cp: dir2/l: No such file or directory
cp: dir2/m: No such file or directory
cp: dir2/n: No such file or directory
cp: dir2/o: No such file or directory
cp: dir2/p: No such file or directory
cp: dir2/q: No such file or directory
cp: dir2/r: No such file or directory
cp: dir2/s: No such file or directory
cp: dir2/t: No such file or directory
cp: dir2/u: No such file or directory
cp: dir2/v: No such file or directory
cp: dir2/w: No such file or directory
cp: dir2/x: No such file or directory
cp: dir2/y: No such file or directory
cp: dir2/z: No such file or directory
答案 0 :(得分:1)
可能的原因是您无权创建dir2。查看错误输出的开头以帮助诊断问题:
$ cp -R patient_mgmt_engine lsdkf 2>&1 | head
cp: dir2: Permission denied
...
如果问题是您无权创建dir2,请使用ls -l
确定缺少哪些权限,chown
或chmod
授予您自己的权限。< / p>