LinuxMind trick — the one you will actually use today. You know the file is somewhere in this project. You know roughly what it is called. So you type find . -name "*.conf" -type f and then stare at a wall of paths, half of them buried in .git, node_modules and build output you never wanted to see. There is a better default, and it is called fd.
Meet fd
fd is a find replacement written in Rust, and its whole point is to give you the answer to the question you were actually asking. It is faster, its syntax is friendlier, it respects your ignore files by default and it colours the output so a directory tree reads like a directory tree instead of a paragraph.
Where find makes you write a full predicate — -name, -type, -path — fd takes a regular expression as its first argument and figures out the rest. Most of the time the command is three words long.
Install it
# Debian / Ubuntu
sudo apt install fd-find
# Fedora
sudo dnf install fd-find
# Arch / CachyOS
sudo pacman -S fd
One wrinkle on Debian and Ubuntu: the binary is installed as fdfind, because the name fd was already taken by an older package. Add a shell alias once and forget it:
alias fd='fdfind'
The three commands you will run first
fd conf # any path containing "conf"
fd -e jpg # every .jpg file, recursively
fd -t d src # only directories named "src"
Notice what is missing. No quotes around the pattern unless you need a real regex, no . to mean the current directory, no -print. fd skips hidden files and anything matched by your .gitignore automatically — which is why it returns ten useful results instead of a thousand useless ones.
Do something with the results
The real power is passing matches to another command. Use -x to run a command per result and -X to run it once with every result at the end:
fd -e png -x convert {} {.}.webp # convert each match
fd -e log -X rm # delete them all at once
fd -t f -e md -x wc -l # count lines in every markdown file
The {} placeholder is the path, and {.} is the path with its extension stripped. That alone replaces a lot of shell glue you used to write by hand.
Reach for the hidden stuff when you need it
fd -H .bashrc # include hidden files
fd -I build # ignore .gitignore and search everything
fd --changed-within 2d # files touched in the last two days
fd --changed-before 1w # files older than a week
--changed-within is the one that quietly wins arguments: after a long session, fd --changed-within 1d tells you exactly which files you touched, without remembering a single path.
Today’s move
Run fd -e conf in a project you know well and compare the output with the find line you would have typed. That is the whole trick: fd is not a new concept to learn, it is the same search with the ceremony removed and the noise filtered out. Alias it over find in your shell if you are feeling bold, and keep the old syntax for the day a script really needs it. One command, half the typing, twice the signal.





Leave a Reply