fd — Trivia & Interesting Facts¶
Surprising, historical, and little-known facts about fd, the modern find alternative.
fd was created because find's syntax is hostile¶
David Peter (sharkdp) created fd in 2017 specifically because GNU find's syntax is notoriously hard to remember. The classic example: find . -name "*.txt" -type f becomes just fd -e txt. Peter has said that find's argument syntax, which uses a mini query language instead of standard flags, is one of Unix's worst UX decisions.
fd is written in Rust and it shows in the benchmarks¶
fd is 5-10x faster than GNU find in most benchmarks, primarily because it uses parallelism by default (multiple threads via the ignore crate), respects .gitignore automatically, and uses the Rust regex engine. On a large repository with 100,000+ files, fd can complete in under a second where find takes 5-10 seconds.
fd shares DNA with ripgrep¶
fd uses the same ignore crate that powers ripgrep's file filtering. This means fd and ripgrep handle .gitignore, .fdignore, and .ignore files identically. Both tools were part of the same wave of Rust CLI tools that emerged in 2016-2017, sometimes called the "Rust CLI renaissance."
The name "fd" conflicts with a classic Unix concept¶
"fd" normally stands for "file descriptor" in Unix/Linux — the integer handles (0=stdin, 1=stdout, 2=stderr) that processes use for I/O. Naming a file-finding tool "fd" was a deliberate choice by sharkdp. On some systems, the binary is installed as fdfind to avoid conflicts (notably Debian/Ubuntu).
fd's colorized output is not just cosmetic¶
fd applies LS_COLORS to its output, meaning files are colored by type and extension just like ls. This is not trivial — parsing and applying LS_COLORS is a surprisingly complex task involving a database of file extension mappings. fd handles this through the lscolors crate, also written by sharkdp.
fd can execute commands faster than find -exec¶
fd's -x (execute) and -X (execute batch) flags run commands in parallel by default, unlike find -exec which runs them sequentially. fd -e jpg -X convert will process all matched JPEG files using multiple CPU cores. The -X flag collects all results and passes them as a batch, similar to find -exec ... + but with parallel execution.
Smart case is the default, not an option¶
fd uses smart case by default: if your pattern is all lowercase, the search is case-insensitive; if it contains any uppercase letter, it becomes case-sensitive. This behavior, borrowed from Vim and ripgrep, means fd readme matches "README.md" but fd README only matches exact case. Most users never need to think about the -i or -s flags.
fd respects .gitignore by default — and this is controversial¶
By default, fd skips files listed in .gitignore, hidden files, and hidden directories. This is a deliberate UX choice: most of the time, you do not want to search node_modules/ or .git/. But it means fd and find can return different results on the same directory, which has confused users expecting exact parity.
sharkdp created an entire ecosystem of Rust CLI tools¶
David Peter did not stop at fd. He also created bat (a better cat), hyperfine (benchmarking tool), hexyl (hex viewer), pastel (color tool), and lscolors (the library). Together, these tools form one of the most influential collections of modern CLI utilities, all written in Rust.
fd's regex engine compiles patterns at startup¶
fd compiles its regex pattern into an optimized automaton before starting the directory walk. This means the cost of regex compilation is paid once, not per-file. For searches across millions of files, this design decision makes a meaningful difference compared to tools that interpret the pattern per-match.