Die, yum, die

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

  1. Jeremy

    I found this post incredibly useful because of the kill %1 command. I always wondered how to convert the [1] from jobs to an actual pid. I used to have to look it up in ps — now I don’t have to.

    Thanks!

  2. Chris Samuel

    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..

Leave a Reply

Your email address will not be published. Required fields are marked *