DEV Community

Discussion on: Get to Know the Command Line: Basic Commands

Collapse
 
martinfeineis profile image
Martin Feineis

One of my favourite aliases is hi=history | grep
makes it super easy to get the commands I know have a certain string, be it the name of the command, a substring of a hostname or an argument to a command.

Collapse
 
torianne02 profile image
Tori Crawford

I'm planning on covering aliases in another blog post for this series! They are actually something relatively new to me, so thank you for introducing this one to me and adding to the discussion.

Collapse
 
tam360 profile image
Mirza

You can also use ! to execute specific command from the history list like !1986 where 1986 is the command ID Using history with grep and !