title: "fzf with fd—and Beyond" date: "2025-06-02" slug: "fzf-with-fd-and-beyond" published: true layout: "blog-post" tags:
fzf with fd—and BeyondAt first glance, fzf looks like a simple fuzzy finder for your terminal. You type part of a string, and it finds the best matches in a list. That alone is powerful—but not enough. To use fzf effectively, you need to feed it good data. That’s where tools like fd come in.
fd: Clean Input for Better Outputfd is a modern replacement for find. It's faster, more intuitive, and designed to work well with other command-line tools. While fzf handles fuzzy selection, fd generates the list of items you can select from. This separation of concerns is critical.
Compare:
fzf
This opens fzf with no input. It waits for something to search. You can type, but it does nothing useful.
Now:
fd . | fzf
fd recursively lists all files from the current directory. fzf then allows you to quickly pick the one you want. Together, they create an interactive file navigation system that’s faster and more flexible than a GUI.
The power of fzf extends far beyond picking files:
git checkout $(git branch | fzf)
Quickly switch branches without remembering exact names.
history | fzf
Find a previously used command without paging through history.
ps aux | fzf | awk '{print $2}' | xargs kill
Fuzzy-select a process to kill without manually finding the PID.
cat ~/.ssh/known_hosts | cut -d',' -f1 | fzf | xargs ssh
Choose a remote host to connect to from your known SSH entries.
ls ~/scripts | fzf | xargs -I{} bash ~/scripts/{}
Select a script to execute from a collection.
systemctl list-units --type=service --all | fzf | awk '{print $1}' | xargs systemctl restart
Interactively restart a systemd service.
fzf alone is an interface. What makes it useful is your data source. The better your source list, the more powerful your workflow. fd, git, ps, ls, systemctl, and even cat can be used as upstream providers to create dynamic, contextual interfaces with minimal overhead.
Use fzf as a control mechanism: a selector for lists you define. Then pipe the output into whatever action you want to take.
fzf is a universal interface for selecting from a list.fd is a fast, modern file generator—perfect as input to fzf.fzf improves speed, clarity, and precision in virtually every shell task involving lists.If you ever find yourself repeating grep or cat into awk to get a list just to copy and paste something—consider using fzf instead.
Link Disclosure
All links are primary source or canonical definition:
- GitHub repos for
fzfandfd- Linux man pages or Wikipedia for commands and core concepts
- Freedesktop for
systemdNo promotional, no affiliate, no commercial links.
No content added, removed, or softened.