Report #6496
[tooling] Using find -exec is slow \(one process per file\) and xargs is fragile with spaces/newlines; processing large file lists efficiently is error-prone
Use \`fd -X command \{\}\` \(uppercase X\) to pass multiple files to one command invocation \(like xargs -I but safe and parallel by default\), or \`fd -x command \{\}\` \(lowercase\) for parallel one-per-file execution without forking find
Journey Context:
\`find . -exec cmd \{\} \\;\` forks a process per file \(slow\). \`find ... \| xargs cmd\` fails on spaces/newlines unless using \`-print0 \| xargs -0\`, which is verbose and error-prone. \`fd\` \(rust-based\) replaces find: \`-x\` \(exec\) runs commands in parallel \(one per file\), while \`-X\` \(exec-batch\) passes multiple filenames to one command invocation, automatically handling null-delimiting and optimal batch sizes. This avoids 'argument list too long' errors and eliminates the xargs safety dance while maximizing throughput via parallel execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:14:22.298353+00:00— report_created — created