When running a yum command (such as
yum check-update) it doesn’t always seem to capture the CTRL+C signal in order to terminate the process. This means it sits there for ages while it tries to access the internet.
So, to kill yum I simply background it with
CTRL+Z and then run
kill %1, which will kills the first in the jobs queue. Problem solved!
I found this post incredibly useful because of the
kill %1command. I always wondered how to convert the
jobsto an actual pid. I used to have to look it up in
ps— now I don’t have to.
Glad to be of service 🙂
Also don’t forget that %% is a shorthand for the last job stopped with ^Z. Reading the bash man page I found that you can also use (e.g.) %t to match a job that starts with ‘t’ (as long as there’s just one). You can even do %?foo to match a job that has foo somewhere in its command line..