Useful Command Line Workflows

Search through history

You’re trying to remember how to do something you did in the recent past, but can only remember generally what it’s about

joe$ history | greg foo

this takes all of your command line history, and pipes it to grep for any line that has the word “foo”. What you end up with, is a set of results like…

123 foo -bar
145 foo --name="bizz"