DEV Community

Discussion on: Linux Terminal: The Ultimate Cheat Sheet

Collapse
 
bradnichol profile image
Bradley Nichol

My newest favourite History command uses grep and is great for finding a command that you have a faint memory of.

history | grep "keyword"

Collapse
 
zerolife profile image
Andrew Abraham

just use ctrl - r
Does the same thing. :)

Collapse
 
mauro_codes profile image
Mauro Garcia

True! I included the ctrl + r shortcut in my second post about the Linux terminal (which will be published next Monday)

Collapse
 
mauro_codes profile image
Mauro Garcia

I love that approach! Btw, the grep command is one of the many that I decided to add in another post because this one was already too big 😂

Collapse
 
bradnichol profile image
Bradley Nichol

Great stuff, look forward to reading your next mammoth post 😁

Thread Thread
 
fwolfst profile image
Felix Wolfsteller

For most situations, I would prefer searching through the history with CTRL+r (you might consider adding that one), but yes sometimes you want to see the full list.

Thread Thread
 
bradnichol profile image
Bradley Nichol

OK, that's pretty awesome! Thanks for that.