Skip to main content

Hidden and Ignored Files

fd's sensible defaults are designed to keep noise out of your search results. However, as an administrator, you sometimes need to pierce through those defaults to find configuration files or audit git history.

1. Hidden Files (-H, --hidden)

In Unix, any file or directory starting with a dot (.) is considered hidden.

By default, fd skips all hidden files and directories. It will not search .ssh, .config, .git, or find files like .env.

To force fd to search hidden paths, use the -H flag.

# Search for ssh keys inside hidden directories
fd -H id_rsa

2. Ignored Files (-I, --no-ignore)

As covered in the previous section, fd skips paths listed in .gitignore.

To force fd to search ignored paths, use the -I flag.

# Search inside node_modules
fd -I lodash

3. The "Search Everything" Override (-u, -uu)

If you want fd to behave exactly like traditional find—searching absolutely every file on the disk regardless of whether it is hidden or ignored—you must combine -H and -I.

fd -H -I "secret"

Because typing -H -I is common for administrators, fd provides a powerful shorthand: the Unrestricted (-u) flag.

  • -u (Unrestricted): Alias for -I (Do not respect .gitignore).
  • -uu (Double Unrestricted): Alias for -H -I (Do not respect .gitignore, AND search hidden files).
# The equivalent of a pure `find . -name "*secret*"`
fd -uu secret
Performance Warning

Running fd -uu from the root partition / or inside a massive project folder will result in fd crawling .git/objects and node_modules/, returning thousands of irrelevant matches and significantly increasing execution time. Use -uu only when necessary.

Summary Matrix

FlagSearches Hidden (.env)Searches Ignored (node_modules)
(Default)NoNo
-HYesNo
-I (or -u)NoYes
-H -I (or -uu)YesYes