How to find a file by name
Search for files by name on Linux with find and locate, on Windows with dir /s and Get-ChildItem — including case-insensitive and partial matches.
Beginner · about 5 min · Linux, Windows, macOS
You know part of the filename but not where it lives. Every platform has a built-in recursive search — the trick is quoting the pattern correctly and limiting the search so it finishes quickly.
What this guide covers
- Linux: search by exact or partial name
- Linux: search the whole system quietly
- Linux: instant results with locate
- Windows CMD: recursive search
- PowerShell: filter and sort results
- Search file contents instead of names
Common pitfalls covered
- Linux filenames are case-sensitive — use … unless you are certain of the casing.
- Searching from … scans network mounts too; add … to stay on one filesystem.
- PowerShell recursion without … floods the console with access-denied errors.
Questions answered
- How do I find a file if I only know part of the name?
- Why is find so slow?
- How do I find recently modified files?
This is a limited preview. The full walkthrough, command syntax and copy-ready examples are available to signed-in users.