Tools & Commands · Linux and Windows Commands
find
Files · Beginner
A Unix utility that walks a directory tree and lists files that match conditions such as name, type, or age.
Start it in a directory you administer, such as logs or a project folder. The conditions decide whether you want a name, a type, or a newer file.
Example: find /var/log -name "*.log" lists log files under the log directory.
Command
Platform: Linux and macOS
find /var/log -name "*.log"
Each printed path matched the name pattern. Permission errors mean the account cannot enter that directory, which is a separate fact from whether the file exists.
Common misconception
- It searches the directory tree you name. It is not a full-text search of the files' contents.