无法理解命令 find 的语法 [英] Unable to understand the syntax of the command find

查看:14
本文介绍了无法理解命令 find 的语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

find 命令似乎与其他 Unix 命令不同.

The find command seems to differ from other Unix commands.

为什么下面的命令末尾有空大括号和倒闪?

find * -perm 777 -exec chmod 770 {} ;

我找到了大括号的一个原因,但没有找到向后闪烁的原因.

I found one reason for the curly brackets but not for the backward flash.

大括号显然是路径

与 -exec 相同,除了 ``{}'' 是替换为尽可能多的路径名每次调用都可能实用性

Same as -exec, except that ``{}'' is replaced with as many pathnames as possible for each invocation of utility

推荐答案

我建议你改为这样做

find . -perm 777 -print0 | xargs -0 chmod 770

xargs"表示获取查找结果并一次将 20 个输入到以下命令.

"xargs" says to take the results of the find and feed it 20 at a time to the following command.

这篇关于无法理解命令 find 的语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆