dailyhack
dailyhack copied to clipboard
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
ls
cd Documents
ls
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
Oooo. Love this one. Thanks
Thank you glad you liked this trick 😄