Why Doesn't Control-C Work in the Linux 'less' Command?

  • Thread starter Thread starter ehrenfest
  • Start date Start date
Click For Summary
To exit the "less" environment in Linux, the command ".q" is effective, as Control-C does not function as expected. The design choice for 'less' to ignore Control-C is intentional, differing from some implementations that allow it to quit with this command. This behavior is part of the standard functionality of 'less', which prioritizes its internal command handling over standard interrupt signals.
ehrenfest
Messages
2,001
Reaction score
1
[SOLVED] getting out of less

How do you get out of the "less" environment in linux? The normal control-C does not work and I am not sure why. I usually just resort to control-Z but then I have to go back and kill the process which is annoying.

EDIT: apparently .q works; but can someone please explain why the normal control-C does not work?
 
Last edited:
Computer science news on Phys.org
The designer of 'less' chose to make it ignore ctrl-c, I don't know why.
Some implementations quit on ctrl-C but this isn't the standard behaviour.
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 18 ·
Replies
18
Views
2K
Replies
3
Views
11K
Replies
10
Views
5K
Replies
3
Views
2K
  • · Replies 123 ·
5
Replies
123
Views
19K
Replies
0
Views
2K
Replies
1
Views
2K
  • · Replies 35 ·
2
Replies
35
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 52 ·
2
Replies
52
Views
6K