跳到主要内容

Searching with grep

English

Finding text with grep

  • grep searches for a word and prints only the lines that contain it:
grep error log.txt
  • Out of a huge log, you instantly see just the lines that matter.

grep error keeps only disk error and memory error from the five lines of log.txt

登录或创建账户

IGCSE, A-Level & AP