fd
A command-line filesystem search tool with concise patterns, parallel traversal, ignore-file support, and command execution.
Why consider fd?
fd is a fast, user-friendly filesystem search utility written in Rust as a modern alternative to find. It provides intuitive syntax, colorized output, regex support, and automatic gitignore filtering.
Learn fd by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
Finding Filesystem Entries with fd
When navigating complex directory hierarchies in modern terminal environments, locating specific files quickly is essential. According to its documentation, fd is a program to find entries in your filesystem. Developed as an ergonomic tool for everyday development, It is a simple, fast and user-friendly alternative to find.
Traditional directory search utilities often require verbose command syntax and manual flag tuning for basic tasks. In contrast, the design of fd prioritizes practical convenience: it provides sensible (opinionated) defaults for a majority of use cases. It traverses directory trees in parallel to maximize throughput and delivers colorized terminal output out of the box.
Smart Defaults and Pattern Matching
Case sensitivity in search queries is handled intelligently to reduce keystrokes. As outlined in the documentation, the search is case-insensitive by default. It switches to case-sensitive if the pattern contains an uppercase character automatically. This behavior allows users to type all-lowercase queries without missing matches while easily narrowing results when uppercase characters are specified.
To maintain clean search results during common workspace operations, fd excludes noise automatically. Specifically, fd does not search hidden directories and does not show hidden files in the search results. Developers who need to inspect dotfiles or hidden paths can pass the -H flag when performing exhaustive scans across their filesystem.
Working inside active software projects frequently produces large build caches, dependency folders, and temporary files. By default, fd does not search folders (and does not show files) that match one of the .gitignore patterns. This integration ensures that directories like node_modules or target are skipped during searches unless explicitly overridden with the -I flag.
Command Execution and Batch Operations
Beyond finding filenames, developers often need to execute subsequent actions over matched paths immediately. For per-file processing, The -x/--exec option runs an external command for each of the search results (in parallel). This is particularly useful for unpacking archives or running parallel utility tasks across discovered items:
fd -e zip -x unzipWhen dealing with linters, formatters, or editors, running commands once with multiple inputs is significantly more efficient than invoking separate processes. As detailed in the project guide, The -X/--exec-batch option launches the external command once, with all search results as arguments. This mode passes matching paths together into tools like code formatters:
fd -e h -e cpp -x clang-format -iFor advanced scripting scenarios, fd offers placeholder tokens to manipulate filenames and directory paths dynamically. As noted in the documentation, Here, {} is a placeholder for the search result. {.}. For instance, converting image assets or transforming formats can be performed inline by replacing extensions with the placeholder token:
fd -e jpg -x convert {} {.}.pngProject Metadata and Releases
The project is maintained as an open-source Rust package hosted on GitHub, with primary maintainer attribution specified in the manifest as authors = ["David Peter mail@david-peter.de"]. Community development and issue tracking remain actively organized on the canonical sharkdp/fd repository.
The software is distributed under permissive terms where Permission is hereby granted, free of charge, to any person obtaining a copy of this software under the standard MIT license. Pre-compiled standalone binaries across multiple operating systems and architectures are distributed through the official v10.4.2 release page.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.