[CentOS] reuse the history

Filipe Brandenburger filbranden at gmail.com
Fri Oct 17 18:20:41 UTC 2008


On Fri, Oct 17, 2008 at 14:02, ann kok <annkok2001 at yahoo.com> wrote:
> I want to reuse command in the shell historys
> Which command I can only select "traceroute" to run?

I would type "Ctrl-R" (interactive search history starting with more
recent events), then type "trace", then type "Ctrl-R" again until I
find the command I'm looking for, in your case, 4 times. Once you
start using "Ctrl-R" you will probably never want to use "history |
grep ..." and "!..." again.


> $ history |grep traceroute
>   26  traceroute
>   27  traceroute -n
>   28  traceroute
>   29  traceroute yahoo.com
>   46  traceroute

More information about the CentOS mailing list