Report #15941
[tooling] Processing multiple files with xargs breaks on filenames with spaces or quotes
Use fd --exec-batch cmd \{\} \+ \(or -X\) to safely batch process files with a single command invocation, avoiding shell word-splitting issues.
Journey Context:
xargs -I \{\} cmd \{\} executes the command once per file, which is slow, or with -P for parallelism but still per-file. xargs with no -I can batch but fails on special characters unless using -0 with find -print0. fd's --exec-batch \(or -X\) collects files and passes them all to one command \(like xargs without -I\), but handles the null-delimiter protocol internally, avoiding shell word-splitting issues. It's safer than xargs for filenames with newlines and more efficient than -I \{\} for large file sets, and works cross-platform.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:23:31.576092+00:00— report_created — created