Cod*_*esu 3 fedora permissions find
我读了《Linux圣经第10版》 130页。练习\xe2\x84\x967:
\n\n\n创建/tmp/FILES目录。查找/usr/share目录下\n大于 5MB 且小于 10MB 的所有文件,并将其复制到\n /tmp/FILES目录。
\n
我的命令看起来像find /usr/share -type f -size +5M -size -10M -exec cp {} /tmp/FILES \\;
. 我像普通用户一样运行它并得到
cp: error copying '/bla/bla' to '/lol/kek': Input/output error find: '/usr/share/bla-bla': Permission denied\n
Run Code Online (Sandbox Code Playgroud)\n之后我尝试以超级用户身份运行它并收到错误(没有Permission denied
):
cp: error copying '/bla/bla' to '/lol/kek': Input/output error\n
Run Code Online (Sandbox Code Playgroud)\n请解释一下,即使我以超级用户身份运行它,错误的原因是什么。谢谢。
\nPS 请解释为什么带有 of 的命令-exec
应该为空{}
?
Ste*_*itt 14
EIO
\xe2\x80\x9c 输入/输出错误\xe2\x80\x9d 表示读取源文件或写入目标文件时发生低级 I/O 错误 ( )。这意味着您的存储有问题;dmesg
将为您提供更多信息。
此类错误与特权或权限无关,这就是为什么cp
以 root 身份运行\xe2\x80\x99 不会使它们消失(与 \xe2\x80\x9cPermission returned\xe2\x80\x9d 错误不同)。
了解“find”的 -exec 选项{}
解释了with的用法-exec
。
归档时间: |
|
查看次数: |
824 次 |
最近记录: |