Skip to main content
Welcome guest. | Register | Login | Post

Searching bash history

Do you only half-remember a commandline command you recently used? If you use bash (most likely you do), you don't need to look it up again or reinvent it. Just type control-r and then the part you do remember. Bash will search it's history for commands of which what you typed is a substring.

Example: I remember I used some browser to visit some site named (something)fied(something):

ctrl-r fied

and the result is:

(reverse-i-search)`fied': firefox

Now just press enter to visit everyone's favourite free software help site :-)


cool works with zsh as well

cool Smiling
works with zsh as well - which calls it "bck-i-search"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.