[colug-432] Search Command History
michael at yanovich.net
michael at yanovich.net
Mon Feb 10 16:45:51 EST 2014
On 02/10/2014 04:34 PM, tom wrote:
> Is there a way to search command history for a particular item? For
> example I would like to see every instance I used apt-get without having
> to arrow up or down thru the entire history.
>
> Tom
>
I've heard people suggest using cltr+r and then typing what you are looking
for, but I believe this is shell dependent.
I sometimes just do: history | grep -i "my_term_here"
though if 'history' isn't a valid command in your terminal, I imagine you
could try catting ~/.history or .bash_history / .zsh_history
--
Michael Yanovich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
Url : http://lists.colug.net/pipermail/colug-432/attachments/20140210/1826c056/attachment.bin
More information about the colug-432
mailing list