Online Linux Terminal Logo
OnlineLinuxTerminal
← Tutoriales•Intermediate

Text Searching & Regex with Grep

Comunidad Linux2.4k En línea

Chatea con usuarios de Linux, aprende comandos y descarga guías PDF.

Lesson Objectives

Step 1: Simple Pattern Match

Run `grep -i "error" /var/log/syslog`.

Step 2: Line Numbering

Run `grep -n -i "accepted" /var/log/auth.log`.

Step 3: Invert Filter

Run `grep -v "^#" /etc/hosts`.

bash — terminal