Report #63578
[tooling] Slow or complex file finding with find command that ignores gitignore
Use \`fd 'regex' --type f --exec-batch rm\` for fast parallel batch operations; \`fd\` respects .gitignore and .fdignore by default, uses intuitive regex \(not glob\), and supports \`-X\` \(exec-batch\) to pass multiple files to one command. Example: \`fd -e py -X black\` formats only changed Python files.
Journey Context:
\`find . -name '\*.py' -exec black \{\} \+\` is verbose, doesn't respect gitignore \(processing node\_modules\), and uses glob syntax which is limited. \`fd\` is Rust-based and typically 5-10x faster. The key flags are \`-t f\` \(files\), \`-e\` \(extension\), and \`-X\` vs \`-x\`: \`-x\` runs the command once per file \(like find's \`-exec\`\), while \`-X\` passes as many files as possible to one command \(like \`xargs\`\), which is critical for tools like \`rm\` or \`eslint\` that have startup overhead. Combine with \`fzf\`: \`fd -t f \| fzf -m \| xargs -o vim\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:12:22.982410+00:00— report_created — created