my TIL: history on CLI. I’ve always been lazy using ⬆️ on one server. Just piped it out to a text file so I can grab the common tasks and put them in a script finally. Especially permissions issues on specific paths.

Was about to recommend Ctrl+R, too. Also, you can configure Bash to use Page Up / Down or whatever pair of keys you like to basically do what Up and Down do, but only for entries that begin with the same text you already typed. That’s what I use most.

Bash has hundreds of useful hacks and shortcuts. If you do repeated similar tasks like that, you might also want to get used to ^a^b which re-runs the last command but with a replaced with b. Also try Alt + . to quickly insert the last parameter of the prev command etc etc.

Got Something To Say?

Your email address will not be published. Required fields are marked *