command stack in buffer

Patton Echols p.echols at
Tue Jan 5 09:44:13 UTC 2010

On 01/05/2010 12:56 AM, vijay shanker wrote:
> Hi all,
> I hope many of you must be aware of this.
> When i use a terminal to execute my commands. Some times i need to 
> execute same command multiple times. So, if i want to choose 
> a previously executed command, It makes me very tired to choose from 
> history of command.

Do you mean that you don't want to scroll through the history to get to 
the command you want?

What I use is [Ctrl]+r  Then start typing the command.  What the shell 
will do is search back through your commands to the most recent match.  
Sometimes you need to keep typing a few extra characters to get the 
right one. 

Example:  I routinely ssh to two different computers.  One is the server 
in my local network and the command is:
$ssh pecho at
The other is to vpn and remote desktop to my office using this:
 ssh -C -p 13254 pecho at -L 5901:localhost:5900

if [Ctrl]+R "ssh" gives the first one, then I keep typing until I get to 
"ssh -" and the shell finds the right one.

Try it! 
(BTW this is the bash shell which I believe is the standard in Ubuntu)
> So , instead of choosing I prefer to go and write it again. But i was 
> thinking if there existing any thing that can remove duplicates form 
> the command history?

> Regards,
> Vijay Shanker Dubey

More information about the ubuntu-users mailing list