且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如果在其中一个文件上失败,如何从find -exec退出

更新时间:2023-11-29 23:42:58

In addition to the other fine answers, GNU find (at least) has a -quit predicate:

find path -other -predicates \( -exec cmd {} \; -o -quit \)

The -quit predicate is certainly non-standard and does not exist in BSD find.

相关阅读

推荐文章