That feeling when you mean to select pg_dump from your BASH history, but miss, and instead select dropdb.

Never mind, I really fancied doing it all again.

#postgres #BASH #linux

I'm assuming everyone knows about using "Ctrl-r" to search through your BASH history.

For example, to search for all your cd commands press "Ctrl" and "r" at the same time followed by "cd". That will show your last cd command. To see the previous one press Ctrl-r again. Keep pressing Ctrl-r to do a reverse search through all your cd commands.

#BASH #Linux #CLI

@wmarshall
Horses for courses. 😃
Of course, you can do that, too. However, "Ctrl-r cd" is only 5 keystrokes, so a bit faster.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.