Sunday, April 28, 2024
399
rated 0 times [  399] [ 0]  / answers: 1 / hits: 396548  / 1 Year ago, mon, may 22, 2023, 2:48:17

Other than viewing the history, is there a way to filter my history?



Say I want to search for a command that started with "ssh"?


More From » command-line

 Answers
2

Press Ctrl+R and type ssh. Ctrl+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+R again 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.


[#42366] Monday, May 22, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
steaocyte

Total Points: 345
Total Questions: 122
Total Answers: 121

Location: Spain
Member since Wed, Nov 23, 2022
1 Year ago
steaocyte questions
;