Filter live or recent command output with rg.
Section: Pipes and stdin
Search logs from another command
bash
bash
journalctl -u nginx --since today | rg -i 'timeout|error'Explanation
A fast way to sift through logs without saving them to disk first.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Pipes and stdin
Search file lists or command results
Use another command to produce candidate text and rg to filter it.
Treat input as NUL-separated data
Search data that uses NUL delimiters instead of newlines.
Emit machine-readable JSON results
Use structured output for editor integrations and automation.
Count matching lines globally
Suppress file names and count matches across stdin or a small target.
Search recursively in the current directory
Search for a pattern using ripgrep's recursive defaults.