As @RandyOrrison mentioned, ^C
(control + c) is the appropriate interrupt character. Although, how less
responds to this signal will vary based on the options provided at execution time.
Normally, an interrupt character causes less
to stop whatever it is doing and return to its command prompt (i.e. not the terminal/tty prompt).
If instead, you want to signal less
to quit and return to the terminal/tty prompt, you should use the -K
or --quit-on-intr
option. This will cause less
to exit immediately (with status 2) when an interrupt character (usually ^C
) is typed.
less manpage
-K , --quit-on-intr
Causes less to exit immediately (with status 2) when an interrupt character (usually ^C) is typed. Normally, an interrupt character causes less to stop whatever it is doing and return to its command prompt. Note that use of this option makes it impossible to return to the command prompt from the "F" command.
less -K [filename]...
less --quit-on-intr [filename]...
SHIFT + CNTRL + C
works for me to interrupt without totally killing less