On Tue, 19 Jan 2016 02:17:30 -0800 (PST)
shraw...@gmail.com wrote:
> Can someone tell me the command for reverse search in UNIX.
> i am only known about ctrl + r in Linux.
ctrl + r is a bash command, that runs everywhere, not only linux
ksh is most common under commercial unixes and it comes with the vi
mode (check the manual page chapter "Vi Editing Mode")
to enable it you must set the vi option:
$ set -o vi
then you can press ESC to enter in the vi control mode and you can use
most of the vi commands like:
/string + ENTER to search a string like in bash
k to get the previous command
j for the next command
l to move the cursor right
h to move the cursor left
i to add text (and then press ESC to return in the control mode)
x to remove a character
ENTER to finally execute the command
additionally the vi mode is present other shells like bash, yash and zsh