What is the fastest way to reload history commands begin with certain characters in linux?
Posted
by
gerry
on Super User
See other posts from Super User
or by gerry
Published on 2011-02-01T13:37:12Z
Indexed on
2011/02/01
15:28 UTC
Read the original article
Hit count: 334
In Dos we can input the first several characters to filter command history and find proper one rapidly. But how to do the same thing in Linux ?
for example when I am testing a local server:
cd
sudo /etc/init.d/vsftpd start
wget ...
ls
emacs ...
sudo /etc/init.d/vsftpd restart
sudo /etc/init.d/vsftpd stop
...
In Dos you can easily type sudo
and switch among the three commands beginning with it using arrow keys. But in Linux, is below command the best we can do ?
historty | grep sudo
I don't like it, because history can easily become a mess, and it also need mouse action.
© Super User or respective owner