4 ms·
history | grep <keyword> I use this for <keyword> rsync or rdesktop when I have forgotten the long list of options & directories etc I also use ctrl R <keywor
by keithpeter 13y ago
history | grep <keyword>
I use this for <keyword> rsync or rdesktop when I have forgotten the long list of options & directories etc
I also use ctrl R <keyword> at the bash prompt but that only gives me the most recent match.
- nja 13y agoActually, after hitting C-R <keyword>, you can keep pressing C-R to search backwards through the history. Or C-S to search forwards. More info: (bash uses emacs editing mode by default) http://www.gnu.org/software/emacs/manual/html_node/emacs/Basic-Isearch.html http://www.gnu.org/software/emacs/manual/html_node/emacs/Bas...
- pbhjpbhj 13y ago>I also use ctrl R <keyword> at the bash prompt but that only gives me the most recent match. // Are you sure, I'm using BASH on Kubuntu and I get previous matches by repeated use of ctrl+R. Actually inspired by a previous post here I made a script "hs" that searches archived history files and shows me all past match lines. Before that I did what you do now.
- keithpeter 13y agoIndeed it does! Excellent