What is the fastest way to reload history commands begin with certain characters in linux?
- by gerry
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.