Ctl+r: search history backwards, then type something unique in your command, e.g.
recalls 'sudo poweroff' for me
If it does not return the command you were lookoing for, pressing Ctl+r repeatedly cycles through all previous commands containing 'off'
^ smart a*se
EDIT: Sorry xaos52 I didn't mean to be so rude.
Last edited by mariannemarlow (2012-08-22 18:57:51)
Between two evils, I always pick the one I never tried before ~ Mae West
For the brave:
You, Sir, are an asshole.
Only thing I dislike about ctrl-r (and I use it all the time) is I then expect all keybindings to work on the command line, and especially hate if I want to do a forward search having gone too far back, so hit ctrl-s and then have to resume with ctrl q.
You can also type history to see your last commands and then do !number from the list
@Enoch, great handle you got there. Busy reading all about you at the moment Off topic: I found this short story by the author that looks quite geeky.
Editing your command happens often. I find ^a and ^e to jump to the start and end of the line helps. And ^left/right arrows to jump words helps too. Oh and esc-del to delete a word, and ^u to clear the line as well! These come in handy when wanting to chop words over ssh where lag doesn't respect keypress rates
Last edited by kbmonkey (2012-08-24 16:51:07)
very useful, my gratitude.
john wesley hardin, was a friend, to the poor.
Every time I type in "sudo," I'm thinking...
Shut Up and DO it!
Could just be me.
"When I enter a command... I expect ass to be hauled and the coffeelike aroma of hustle delicately hovering in the air." -thalassophile
My attempt at a blog; http://jims2011.blogspot.com/
^damin it, that's going to be hard to get out of my head each time I use it now
^ & ^^ - Kinda recasts the whole "sudo make me a sandwich" joke, huh? Makes it sound more like Jackie Gleason.
Yes; as a matter of fact, I am a cop. Why do you ask?
I'm a moderator here. How are we doing? Feedback is encouraged.