[NTLUG:Discuss] Silly noobie question - history

Michael Barnes barnmichael at gmail.com
Thu Feb 8 13:47:19 CST 2007


Richard Witt told me on 2/8/2007 9:34:
> * 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. 
> 

I do this all the time.  However, many times I don't know what I am 
looking for until I see it, or I want a variation of the command.



More information about the Discuss mailing list