fd-find does not find anything

fd-find does not finding anything. When searching something in home directory it instantly exists without any error.

❯ mkdir root

❯ cd root

❯ touch test

❯ ls -l
total 0
-rw-rw-r-- 1 s1n7ax s1n7ax 0 Jul  6 21:29 test

❯ which fd

❯ fd --version
fd 8.7.0

❯ fd test

❯ fd -t f test

I tried installing the same binary using apt package manages as well. it installs 8.3.1 version and binary name changes to fdfind yet no results

Asked By: s1n7ax


Unless passed the -I option, fdfind ignores the same files git ignores and more by looking into the same files as git looks into plus a few of its own.

Quoting the description of the -I option from its man page on Debian:

-I, --no-ignore
Show search results from files and directories that would otherwise be ignored by

  • .gitignore
  • .git/info/exclude
  • The global gitignore configuration (by default $HOME/.config/git/ignore)
  • .ignore
  • .fdignore
  • The global fd ignore file (usually $HOME/.config/fd/ignore)

The flag can be overridden with ‘–ignore’.

To see which of those conf files (and possibly more) fdfind finds, you can run it as:

strace -ze file fdfind test

Where strace will report the successful (-z) file-related system calls fdfind makes where you might see it open a .gitignore file in the parent directory or parent’s parent or some other file that specifies patterns of files or directories to ignore in a gitignore fashion.

Answered By: Stéphane Chazelas
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.