[pappy@chmodx]:$ man grep

$ grep

Print lines that match patterns

DOCUMENTEDSearch & textUbuntu 24.04 LTS baseline

Synopsis

grep [OPTION]... PATTERNS [FILE]...

What it does

Examples

Find a word in a file
grep 'error' application.log
Search recursively
grep -R 'Listen' /etc/nginx/
Ignore case
grep -i 'warning' file.txt

Important details

These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration. For exact option semantics, the linked authoritative documentation is the source of truth.