↑↓ move Enter open Esc close

How to Find Files by Name in Linux

Locate files and directories by exact name or wildcard pattern with find.

Use find when you know something about a path but not where it lives. Combine a start directory, type and name pattern.

Step by step

1 Find an exact file

$ find . -type f -name "config.yml"

Searches recursively for that exact filename.

2 Find by extension

$ find . -type f -name "*.log"

Keep wildcards quoted so the shell does not expand them first.

3 Ignore case

$ find . -type f -iname "readme*"

Matches common capitalization variants.

4 Find directories

$ find /var -type d -name "cache"

Use -type d when you need directories.

Tips worth knowing

Frequently asked questions

How do I search for a filename in Linux?

Use `find START -type f -name "NAME"`.

How do I search case-insensitively?

Use `-iname` instead of `-name`.

The commands behind it

More how-to guides