Thursday, January 4, 2018

How do I search my command-line history for commands I used before?

Press Ctrl+R and type sshCtrl+R will start search from most recent command to old one (reverse-search). If you have more than one command which starts with ssh, Press Ctrl+Ragain and again until you find the match.
Once you've found the match you can press Enter to execute the command or left / right cursor to just select the text of the command.
There is no default reverse option for Ctrl+R to invert the direction of the search but here you will find some suggestions about it.

No comments:

Post a Comment

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...