Bash History

Clive Menzies clive at clivemenzies.co.uk
Fri Jun 9 09:31:35 UTC 2006


On (09/06/06 11:49), OOzy Pal wrote:
> in Konsole, I remember long time ago that I can write a letter then
> click on arrow up or down to navigate through the bash history. Only
> history that starts with the letter I entered will appear. i.e. if I
> do:
> 
> $ apachectl configtest
> $ rm abc
> $ ls -a
> $ ls -l
> $ rm -fr *
> 
> then I type r in the konsole and click up/down arrow I can only see
> the rm abc and rm -fr * commands.
> 
> I did this in Mandrake 7.
> 
> If I am making sense, how can I do this in Ubuntu?

The default behaviour is to ignore anything you've typed in when you
press the up/down keys.  However, if you press Ctl+r and begin to type a
part of the command you're looking for, it will find the most recent
relevant command.  I would imagine you can change the default behaviour
in .bashrc

Regards

Clive

-- 
www.clivemenzies.co.uk ...
...strategies for business






More information about the ubuntu-users mailing list