Search

Summary

This note is a quick reference for finding text and files in the shell. These commands are some of the most useful building blocks for troubleshooting and general terminal work.

Commands

CommandPurpose
grep error logfile.logsearch for matching text inside a file
`journalctlgrep ssh`
find . -name "*.txt"search for files by name from the current directory downward

Example usage

grep error app.log
journalctl | grep ssh
find . -name "*.conf"

Notes

  • grep is for matching text
  • find is for locating files and directories
  • using both together becomes very common once you start troubleshooting logs and configuration