Ravi Sir's Cards › AWS
grep vs find
This comparison card contrasts grep and find. grep is described as searches inside files. find is described as searches names and properties. The card pairs grep with what does the log say?, and find with where is the big file?
Read card text
What this card says
Search
grep
Searches inside files.
find
Searches names and properties.
Key points
Matches text lines.
Matches size, age, owner.
Example
grep -rn ERROR /var/log
Use when
What does the log say?
Where is the big file?