当我使用失败find
的子命令运行命令时,返回退出代码:-exec
find
0
$ find . -iname '*.txt' -exec ls foo \;
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
$ echo $?
0
如果它的任何子命令失败,有什么方法可以find
失败吗?