You probably don't need find

I used to use find to grab all files with a particular extension: find . -name '*.md'. Even this simple search has far too many rough edges:

In zsh, you can use globbing to recursively find all files that match a pattern with **/*.md. This will match README.md, posts/my_post.md, and a/b/c.md. I find echo **/*.md much easier to read and write than that find command.

And Bash supports recursive glob searches too! You need to use shopt -s globstar to turn on ** pattern matching. Once you turn it on (which is safe to do in your ~/.bashrc!), it will behave the exact same way that zsh's globbing does. (The default Bash on many Macs is 3.2, a version released in 2006, which does not support globstar)

Globbing works great, but it searches all of your files, and it doesn't allow you to specify additional filters. Maybe you don't want to search your node_modules or your lib. fd is a utility similar to ripgrep (or the older ag or ack) with sensible defaults that respects your .gitignore. fd .md is a whole lot simpler than find . -name '*.md'. (And fd supports many of the more complex options that find does as well if you'd like to find files by edit date or anything like that)

The one footgun with fd (or rg) is that it will ignore "hidden" files and directories that start with a . unless you specify --hidden. The main case that I've run into this is searching for a Github Action in a repo. Actions are stored in a .github/actions directory, so I once spent a few minutes perplexed about why I couldn't find an action I knew existed.

Globbing has been around for decades. fd is almost ten years old. Newer tools and techniques aren't necessarily better than older ones, but I think it makes sense to avoid find today unless you're on a machine that you can't easily install tools on and globbing isn't good enough for the search you want to do.