Another app is currently holding the yum lock; waiting for it to exit
2014-11-10 16:07
429 查看
(1) 查看当前所有进程:ps -ef 或者 ps -aux
(2) 杀掉进程: kill -9 pid
eg:杀掉deepin-music-player进程,假设其pid=3435,则使用: kill -9 3435
(其中,-9是强制,尽快终止进程的意思)
杀掉进程的方法如下:
1. ps -ef | grep deepin-music-player
(或者:ps -aux | grep deepin-music-player)
运行上面的命令,结果显示的第二列就是 deepin-music-player 的pid
在使用 kill -9 deepin-music-player-pid 就行了
2.使用 pgrep -- ps+grep
pgrep deepin-music-player //运行该命令,可得到一个pid。
之后再使用kill命令即可。
3.使用 pidof -- pid of xxprocess
pidof deepin-music-player //同样得到一个pid。
之后再使用kill命令即可。
4.结合以上命令一次性进行 进程查找 和 终止 动作:
(1) ps -ef | grep deepin-music-player | grep -v grep | cut -c 9-15 | xargs kill -9
说明:
“grep deepin-music-player”的输出结果是,所有含有关键字“deepin-music-player”的进程。
“grep -v grep”是在列出的进程中去除含有关键字“grep”的进程。
“cut -c 9-15”是截取输入行的第9个字符到第15个字符,而这正好是进程号PID。
“xargs kill -9”中的xargs命令是用来把前面命令的输出结果(PID)作为“kill -9”命令的参数,并执行该命令。“kill -9”会强行杀掉指定进程。
(2) 使用 pgrep 和 pidof 简化(1)
pgrep deepin-music-player | xargs kill -9
(3) 使用脚本语言
$ ps -ef | grep deepin-music-player | awk `{print $2}` | xargs kill -9
其中,awk `{print $2}`的作用就是打印出(print)出第二列的内容。
$ kill -9 `ps -aux | grep deepin-music-player | awk `{print $2}`
$ kill -9 `pgrep deepin-music-player`
(4) 使用 pkill -- pgrep+kill 命令
pkill -9 deepin-music-player
本文出自 “whatever957” 博客,请务必保留此出处http://whatever957.blog.51cto.com/6835003/1710550
(2) 杀掉进程: kill -9 pid
eg:杀掉deepin-music-player进程,假设其pid=3435,则使用: kill -9 3435
(其中,-9是强制,尽快终止进程的意思)
杀掉进程的方法如下:
1. ps -ef | grep deepin-music-player
(或者:ps -aux | grep deepin-music-player)
运行上面的命令,结果显示的第二列就是 deepin-music-player 的pid
在使用 kill -9 deepin-music-player-pid 就行了
2.使用 pgrep -- ps+grep
pgrep deepin-music-player //运行该命令,可得到一个pid。
之后再使用kill命令即可。
3.使用 pidof -- pid of xxprocess
pidof deepin-music-player //同样得到一个pid。
之后再使用kill命令即可。
4.结合以上命令一次性进行 进程查找 和 终止 动作:
(1) ps -ef | grep deepin-music-player | grep -v grep | cut -c 9-15 | xargs kill -9
说明:
“grep deepin-music-player”的输出结果是,所有含有关键字“deepin-music-player”的进程。
“grep -v grep”是在列出的进程中去除含有关键字“grep”的进程。
“cut -c 9-15”是截取输入行的第9个字符到第15个字符,而这正好是进程号PID。
“xargs kill -9”中的xargs命令是用来把前面命令的输出结果(PID)作为“kill -9”命令的参数,并执行该命令。“kill -9”会强行杀掉指定进程。
(2) 使用 pgrep 和 pidof 简化(1)
pgrep deepin-music-player | xargs kill -9
(3) 使用脚本语言
$ ps -ef | grep deepin-music-player | awk `{print $2}` | xargs kill -9
其中,awk `{print $2}`的作用就是打印出(print)出第二列的内容。
$ kill -9 `ps -aux | grep deepin-music-player | awk `{print $2}`
$ kill -9 `pgrep deepin-music-player`
(4) 使用 pkill -- pgrep+kill 命令
pkill -9 deepin-music-player
本文出自 “whatever957” 博客,请务必保留此出处http://whatever957.blog.51cto.com/6835003/1710550
相关文章推荐
- yum提示another app is currently holding the yum lock;waiting for it to exit
- Another app is currently holding the yum lock; waiting for it to exit…
- yum提示another app is currently holding the yum lock;waiting for it to exit
- another app is currently holding the yum lock;waiting for it to exit
- centos 解决:Another app is currently holding the yum lock; waiting for it to exit
- CentOS学习笔记1:< yum提示another app is currently holding the yum lock;waiting for it to exit >
- yum安装软件时提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示Another app is currently holding the yum lock; waiting for it to exit.
- Another app is currently holding the yum lock; waiting for it to exit.. yum被锁定无法使用
- yum提示another app is currently holding the yum lock;waiting for it to exit
- another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示Another app is currently holding the yum lock; waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit
- yum提示another app is currently holding the yum lock;waiting for it to exit