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)