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!
-c
4 thoughts on “Die, yum, die”
I found this post incredibly useful because of the
kill %1
command. I always wondered how to convert the[1]
fromjobs
to an actual pid. I used to have to look it up inps
— now I don’t have to.Thanks!
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..
Thanks Chris!
-c