10 months ago

Get last typed command on terminal

You can run the last typed command in the terminal by using !!.

Let's say that your history looks like this:

cd Documents

if you type !! the last command (ls) will be auto-filled in the terminal for you.

But you can also get more specific, by using !<term> so you could use !cd to get the last cd command which was cd Documents

Do you have any comment on this tricks? then let the author know about that. comment here