[NTLUG:Discuss] Silly noobie question - history

Stuart Johnston saj at thecommune.net
Thu Feb 8 09:44:26 CST 2007


Richard Witt wrote:
> * Michael Barnes <barnmichael at gmail.com> [2007-02-08 08:17]:
>> At a command line, I use the up arrow and scroll through the history 
>> list looking for a command.  Once I get up a hundred or so lines, I 
>> decide not to use a command up there.  Is there a quick keystroke to 
>> take me back to an empty command line, or must I always just scroll back 
>> down?
>>
> 
> how about instead of scrolling up using the arrows you just use the
> history command to search for the previous command you were looking for.
> Something like:
> 
> history |grep <command>
> 
> I have found this VERY  useful and have even created and alias because i
> use it so much. 
> 


Also try Ctrl-r for iterative searching.



More information about the Discuss mailing list