uutils/findutils

-printf: unrecognized %X / \X directives should warn and print literally, not be dropped or error

オープン

#815 opened on 2026/08/07

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (96 件のフォーク)user submission
good first issue

Repository metrics

Stars
 (635 個のスター)
PR merge metrics
 (平均マージ 26d 6h) (30d で 46 merged PRs)

説明

GNU findutils treats an unrecognized -printf directive as a warning and prints the directive text verbatim, exiting 0. uutils/findutils diverges in two ways.

%X - the % is silently dropped

$ # GNU findutils 4.10.0
$ find d -printf '%€|\n'
find: warning: unrecognized format directive '%€'
%€|
$ echo $?
0

$ # uutils
$ find d -printf '%€|\n'
€|
$ echo $?
0

The % disappears. Same for the ASCII case, e.g. %q.

\X - uutils errors instead of warning

$ # GNU: warns, prints `\€`, exit 0
$ # uutils: hard error, exit 1

コントリビューターガイド