Noureddine RAMDI / fd: a fast, user-friendly Rust alternative to Unix find with parallel command execution

Created Tue, 05 May 2026 18:13:32 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

sharkdp/fd

fd is a fast, user-friendly alternative to the classic Unix find command, written in Rust. It simplifies searching files and directories with intuitive syntax while delivering speed gains through parallelized directory traversal. What sets fd apart is its ability to execute commands in parallel on found files using a placeholder syntax inspired by GNU Parallel — turning a simple file finder into a powerful batch-processing tool.

What fd does and how it is built

At its core, fd searches for filesystem entries matching a pattern, much like find, but with a more convenient and less verbose interface. Instead of the traditional find syntax, you just run fd PATTERN. For example, searching for files containing “netfl” in their name is as simple as:

fd netfl

Under the hood, fd is implemented in Rust, a language known for safety and performance. It leverages parallel traversal of directories to increase speed significantly compared to the single-threaded find command. The command name itself is shorter, making it quicker to type.

fd respects common developer conventions by default: it skips hidden files, respects .gitignore files, uses smart case-insensitive matching, and colorizes output similarly to ls. It supports both regex and glob pattern matching, giving flexibility in search criteria.

Why fd’s parallel command execution distinguishes it

One of fd’s standout features is its ability to execute commands on search results in parallel, specified with -x or --exec. Unlike find’s -exec, fd supports GNU Parallel-style placeholders like {}, {.}, {/}, {//}, and {/.} to represent various parts of the matched file path. This design turns fd into a composable tool that can find and process files in one step without juggling xargs or complicated loops.

This parallel execution model is a tradeoff between ease of use and shell compatibility: while it covers many common use cases elegantly, extremely complex command pipelines may still require traditional tools. The codebase is notably clean and pragmatic, focusing on developer experience without sacrificing performance.

Rust’s safety guarantees and concurrency primitives make the parallel traversal and command execution robust and efficient. This reduces the risk of race conditions or common bugs found in shell scripts handling large file sets.

Quick start

The fd README provides several usage examples to get started quickly:

Run fd with a search pattern to find entries containing that pattern recursively from the current directory:

> fd netfl
Software/python/imdb-ratings/netflix-details.py

Patterns are treated as regular expressions. For example, find entries starting with “x” and ending with “rc”:

> cd /etc
> fd '^x.*rc$'
X11/xinit/xinitrc
X11/xinit/xserverrc

Specifying the root directory

You can provide a directory as a second argument to search within it:

> fd passwd /etc
/etc/default/passwd
/etc/pam.d/passwd
/etc/passwd

List all files recursively

Calling fd with no arguments lists all entries recursively, similar to ls -R:

> cd fd/tests
> fd
testenv
testenv/mod.rs
tests.rs

To list all files in a specific directory, use a catch-all pattern like .:

> fd . fd/tests/
testenv
testenv/mod.rs
tests.rs

Search by file extension

Use the -e or --extension option to find files by extension, e.g., Markdown files:

> cd fd
> fd -e md
CONTRIBUTING.md
README.md

Combine extension filtering with a search pattern:

> fd -e rs mod
src/fshe

Verdict

fd is a practical, performance-conscious replacement for find that targets real-world developer workflows. Its defaults make it friendlier out of the box, respecting .gitignore and hidden files, while the parallel directory traversal speeds up searches on large trees.

The parallel command execution feature is particularly valuable for batch-processing files without the usual shell gymnastics, streamlining complex pipelines.

However, fd does not replicate every find feature — if you need very specialized predicates or extremely complex actions, traditional find or GNU Parallel might still be necessary.

For developers who want a faster, clearer, and more modern file finder that integrates well into shell pipelines, fd is worth adopting. Its Rust implementation provides a robust foundation, and the code quality reflects pragmatic choices prioritizing speed and usability over exhaustive feature bloat.


→ GitHub Repo: sharkdp/fd ⭐ 42,844 · Rust