I always wonder why do you see so many people pressing up a bazillion times when trying to bring a command they recently typed. Just use ctrl+r and type part of the previous command, it'll save you many hours of pressing up.
in .bashrc I have an alias: alias his='history | grep ' So I use $ his ssh to see all the ssh command I've entered. It's a shorter list than history and more than [Ctrl]+r Then !1234 to run a command again.
in .bashrc I have an alias:
ReplyDeletealias his='history | grep '
So I use
$ his ssh
to see all the ssh command I've entered.
It's a shorter list than history and more than [Ctrl]+r
Then !1234 to run a command again.
[...] Know your history (at least in bash) [...]
ReplyDelete