Two Nifty Terminal History Tricks

May 12, 2010 — Leave a comment

I’ve covered the ‘history’ command before, but here are two more useful Mac OS X Terminal commands…

I’ve been using the Ctrl+ R trick (Hit Ctrl + R, start typing part of the command you want. If you don’t like the first suggestion hit Ctrl + R again to show the next one). This is really handy and fast and it will return matches from the middle of the string.

And I just found another great Terminal command here: Discover the last used command beginning with anything without executing it… this one is a bit harder to use:

![needle]:p

…where [needle] is the first character(s) of the command you’re looking for. It’s not as flexible because it only shows the most recent match instead of cycling through the results, but could still come in handy.

By Jay Docherty

Posts

No Comments

Be the first to start the conversation.

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>