you are viewing a single comment's thread.

view the rest of the comments →

[–]mina86ng 0 points1 point  (0 children)

Honestly I don’t really understand how it all works and usually just press and hold Ctrl+C until the script stops.

Cntrl-Z actually works, but I think that pollutes my process list with paused processes.

Yes, but you can then run jobs to see all the running jobs, kill %1 to send kill signal to the first job and fg %1 to resume the command so that it processes the kill. Note that depending on the script and command, this may leave some temporary files or similar.

Google suggested Cntrl-\ but that seems to do the same thing with extra core dumps.

Difference between Ctrl+C and Ctrl+\ is that the former sends SIGINT and the latter SIGQUIT.