find
where is that filefind starts at a directory and visits everything beneath it, printing each entry that passes every test you list. Tests are joined by "and" unless you say otherwise, and a match can be handed straight to another command with -exec.
find answers by what a file is like, not only by what it is called.
At the terminal
Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.
What the numbered lines are telling you
The path begins with the starting point you gave, so results can be pasted straight into another command.
The name ends in .log, the content changed within the last day, and the file is larger than one mebibyte. Tests are "and" by default.
find could not enter a directory it has no rights to. Add 2>/dev/null to hide these, or run it with sudo to search there too.
Switches
A switch changes how the command behaves. These are the ones used day to day; man find lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.
-name PATTERN- Match the file name against a pattern such as "*.log". Case-sensitive.
-iname PATTERN- The same, ignoring upper and lower case.
-type f- Only regular files. Use d for directories, l for symbolic links.
-size +100M- Only files larger than 100 MB. A minus sign means smaller than.
-mtime -7- Only files modified within the last 7 days. +7 means more than 7 days ago.
-maxdepth N- Descend at most N levels below the starting directory.
-exec CMD {} \;- Run a command on each match; {} is replaced by the file’s path.
-delete- Delete each match. Run the search without it first to see what would go.
Variations worth knowing
The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.
find . -type d -name node_modulesOnly directories with that exact name, starting from here.
find . -name '*.tmp' -deleteDeletes every match. Run it once without -delete first and read the list.
find . -name '*.sh' -exec chmod +x {} +Runs a command on the matches; {} is replaced by the file names.
find /home -user asha -newer /tmp/markFiles owned by one user that changed after a reference file did.
In cybersecurity
find is the standard audit tool for a filesystem: it can list every file with a dangerous permission in a single line.
"find / -perm -4000 -type f" lists every program that runs as its owner. Each one outside the usual set deserves an explanation.
"find / -xdev -perm -0002 -type f" finds files any user may modify — a common route to privilege escalation.
A wrong test deletes the wrong thousand files. Always print first, then add the action.