GNU find 的手册页指出:
Run Code Online (Sandbox Code Playgroud)-exec command ; [...] The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find. Both of these constructions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell.
那是从人到find(GNU findutils)4.4.2。
现在我用 bash 和 dash 测试了这个,两者都不需要{}被屏蔽。这是一个简单的测试:
find /etc -name "hosts" -exec …Run Code Online (Sandbox Code Playgroud)