If I\'m in the Terminal and I want to exit or cancel a command how would I do so? Escape does nothing and hitting the up arrow copies the command.
Ctrl + C is used to kill a process with the signal SIGINT
, and can be intercepted by a program so it can clean its self up before exiting, or not exit at all.
Ctrl + Z is used for suspending a process by sending it the signal SIGSTOP
, which cannot be intercepted by the program.
Random fact:
If you were writing a long command such as $ cd /User/myname/Desktop -r grep | .*.*
and want to delete it press Ctrl + U.
Type \c
and hit return. That will clear the current input statement.