Ste*_*itt 38
find的-exec操作可用于此:
find . \! -exec yourscript {} \; -print
Run Code Online (Sandbox Code Playgroud)
将打印yourscript失败的所有文件的名称。
-exec可以通过这种方式将适当的外部命令转换为find测试。
您可以通过find在之前添加测试来限制测试的文件-exec;例如,要将候选人限制为常规文件,请添加-type f:
find . -type f \! -exec yourscript {} \; -print
Run Code Online (Sandbox Code Playgroud)