uutils/findutils

`find -exec {} [args...] \;` fails

已关闭

#614 创建于 2026年1月18日

 (2 条评论) (0 个反应) (0 位负责人)Rust (96 个派生)user submission
good first issue

仓库指标

星标
 (635 个星标)
PR 合并指标
 (平均合并 26天 6小时) (30 天内合并 46 个 PR)

描述

revision: 245623ecc6a19537b9f1fd94cb917653f170291d

cd /
find /usr/bin -name pwd -exec {} -P ';'  # /usr/bin/pwd -P

GNU and BSD show

/

and exit zero, whereas uutils fails:

Failed to run {}: No such file or directory (os error 2)

As per https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/find.html, this is valid.

-exec utility_name [argument ...] ; … A utility_name or argument containing only the two characters "{}" shall be replaced by the current pathname.

贡献者指南