我如何找到匹配给定模式的所有可执行文件并执行命令?

How do I locate and perform a command on all executable files matching a given pattern?

我如何识别我的 Unix (OS X) 系统上匹配特定模式且设置了可执行位的所有文件,以便我可以对它们执行命令?

例如,我想找到在 位设置的给定日期之前创建的所有 .doc 个文件,并且 chmod a-x 它们。

类似

find . -name '*.doc' -perm +0111 -exec chmod a-x ''{}'' ";"

这将完全取决于您"executable"的意思。