Hi,
On Fri, Oct 17, 2008 at 14:02, ann kok annkok2001@yahoo.com wrote:
I want to reuse command in the shell historys Which command I can only select "traceroute 192.168.0.5" 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.
HTH, Filipe
$ history |grep traceroute 26 traceroute 192.168.0.5 27 traceroute -n 192.168.0.5 28 traceroute 192.168.0.10 29 traceroute yahoo.com 46 traceroute 192.168.0.33