Windows
Linux
Text Processing
Search
Windows find equivalent in Linux
Searches for files matching given criteria anywhere in the filesystem.
Windows
→
find
Linux equivalents
find
find
find
Overview
What this command does
Searches for files matching given criteria anywhere in the filesystem.
Migration tip: Linux's
find is much more powerful than Windows' — you can search by name, size, date, permissions, and even execute commands on results.Practical tasks
Common use cases
Search for files and directories
Searches for files matching given criteria anywhere in the filesystem.
find . -name
Search by filename in current dir
find / -name
Search entire filesystem
find . -type f
Find files only (not directories)
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
find . -name "*.txt"
find /home -name "report.pdf"
find . -name "*.log" -mtime -1
find . -size +100M
find . -name "*.tmp" -delete
Walkthrough
Examples with explanations
# Windows: dir /s /b *.txt
find . -name "*.txt" # find all .txt files here
find /home -name "report.pdf" # search in /home
find . -name "*.log" -mtime -1 # logs from last 24hrs
find . -size +100M # files over 100MB
# Find and delete (use with care!):
find . -name "*.tmp" -delete # delete all .tmp files
Reference
Common options and variations
| Command or option | Use |
|---|---|
find . -name | Search by filename in current dir |
find / -name | Search entire filesystem |
find . -type f | Find files only (not directories) |
find . -type d | Find directories only |
find . -mtime -7 | Files modified in last 7 days |
find . -size +10M | Files larger than 10MB |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | find |
Same command on this distribution. |
| Fedora | same command | find |
Same command on this distribution. |
| Arch | same command | find |
Same command on this distribution. |
Keep learning