Instead of find: fd
Use fd for finding files by name at the prompt. The syntax is shorter, the defaults suit code projects, and it walks directories in parallel. Keep find for scripts and for complex tests on permissions, timestamps and ownership.
Both are for finding files and directories by name, extension or path.
Why fd is better
- The syntax is shorter, fd PATTERN instead of find -iname '*PATTERN*', with smart case so the search is case-insensitive unless you type an uppercase letter.
- It is faster. In fd's own benchmark over about 4 million files, fd took 854.8 ms where find took 19.922 s with -iregex and 11.226 s with -iname, roughly 23 and 13 times slower.
- It skips hidden files and anything your .gitignore excludes by default, so results in a code project are what you want to see.
- Running a command on the results is simpler. The -x flag runs it once per result in parallel, and -X runs it once with all results as arguments.
When to keep find
Keep find in portable scripts, since it is specified by POSIX and installed everywhere. find is also more expressive for complex conditions such as file size, modification time, permissions and owner combined with boolean logic, and fd does not aim to cover all of that.
Switching
Install fd and use it interactively. Patterns are regular expressions by default; use -g for globs and -e for extensions. Add -H to include hidden files and -I to include ignored ones, or -u for both. On Debian and Ubuntu the binary is called fdfind because of a name clash, so add an alias or symlink to fd.
Watch out
fd's filtering hides ignored and hidden files, which can make a file look missing. The fdfind name on Debian and Ubuntu breaks copied commands until you add the alias. It is not a full replacement for find's expression language, and scripts written for find need rewriting rather than renaming.
More newer, better command-line tools
Sources
- fd README and benchmark
- find (Unix) (Wikipedia)
- Modern Unix: alternatives to common Unix commands
- A list of new(ish) command line tools (Julia Evans)
Judged on 2026-11-06. See every command-line tools, or all 66 replacements.