Cygwin shortcut for command history

Viewed 14608

How can I search the command history in cygwin?

I don't want to keep pressing the arrow keys to execute a command from console command history.

6 Answers

I think one of the easiest way is to pipeline it with less and press search character ("/") and then type the command you wanna find.

history | less

and then

/text to find

to find the desired command

Another way

is to append the stdout form history command to a file: history > /cygdrive/path/file.txt

and then search in the document.

Related