免责声明:我是一个完全的 Linux 业余爱好者。嗨,我目前正在 CentOS 7 上设置 PHPIPAM 服务器。我正在遵循本指南:https ://hostadvice.com/how-to/how-to-install-phpipam-on-centos-7/ ,它告诉我运行命令:“
find . -type f -exec chmod 0644 {} ;
Run Code Online (Sandbox Code Playgroud)
当我这样做时,消息:
查找:缺少“-exec”的参数。
出现。我该怎么做才能使命令起作用?
通常;用作命令之间的分隔符。但是,因为find -exec它需要作为命令本身的实际参数提供(以指示 -exec 选项的结束位置)。为了实现这一点,它需要被引用或转义:
-exec ..... \;
-exec ..... ";"
-exec ..... ';'
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)find . -type -exec chmod 0644 {} ;
您在行尾\之前缺少一个;(在您引用的链接中缺少)。
此外,您还没有为 提供参数-type。
你的命令应该是:
find . -type f -exec chmod 0644 {} \;
Run Code Online (Sandbox Code Playgroud)
-type c文件类型为 c,如下所示:
b块(缓冲)特殊
c字符(无缓冲)特殊
d目录
p命名管道(FIFO)
f常规文件
l符号链接;如果 -L 选项或 -follow 选项有效,则永远不会如此,除非符号链接已断开。如果要在 -L 生效时搜索符号链接,请使用-xtype.
s插座
D门 (Solaris)
| 归档时间: |
|
| 查看次数: |
812 次 |
| 最近记录: |