Filter previous shell commands.
Section: Searching and Pattern Matching
Search shell history
bash
bash
history | grep dockerExplanation
A good way to recover a command you ran last week but forgot to save.
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 Searching and Pattern Matching
Fast recursive search with rg
Recursively search text quickly while respecting ignore rules.
Build command lines from stdin
Pass stdin items as arguments to another command.