Search history
Search history
⇐ Back to Shell

Questions, comments, or corrections? Send me a message.

Most people know (and love) the fact that you can hit the up arrow and go back through your command history and re-execute commands or fix them up. Sometimes, though, you might need to get to a command that you may have run 20 or 30 commands ago. Now, the first thing that comes to mind is to press up and hold it for a few seconds, but it's messy and you might miss the command you are looking for.

If you are looking for a particular command, the quickest way to get back to it is to use ctl-r. This will search backwords through your history as you type showing matches. If you want another match farther back in the history, hit ctl-r again and it will jump to the next match.

When you find the command you want, you can just hit enter to execute it, or and editing command (right arrow, ctl-e for end of line, etc) and it will go back to a prompt with the command set.