根据关键词获取进程ID然后杀掉进程
2014-07-14 10:43
344 查看
例如需要杀掉监听进程,如下:
使用下面的即可:
进程杀掉:
主要命令如下:lsnr是关键词
[oracle@kel ~]$ ps -ef|grep lsnr oracle 4973 1 1 19:40 ? 00:00:00 /home/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit oracle 4977 4868 0 19:40 pts/0 00:00:00 grep lsnr
使用下面的即可:
[oracle@kel ~]$ ps -ef|grep lsnr|grep -v grep oracle 4973 1 0 19:40 ? 00:00:00 /home/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit [oracle@kel ~]$ ps -ef|grep lsnr|grep -v grep|cut -c 9-15 4973 [oracle@kel ~]$ ps -ef|grep lsnr|grep -v grep|cut -c 9-15 |xargs kill -9
进程杀掉:
[oracle@kel ~]$ ps -ef|grep lsnr oracle 5071 4868 0 19:43 pts/0 00:00:00 grep lsnr
主要命令如下:lsnr是关键词
[oracle@kel ~]$ ps -ef|grep lsnr|grep -v grep|cut -c 9-15 |xargs kill -9
相关文章推荐
- 根据关键词获取进程ID然后杀掉进程
- delphi根据进程ID获取进程路径
- 根据名称获取对应进程名的ID
- Windows 下 根据进程名获取进程ID 以及该进程下所有窗口的句柄
- 根据窗口ID获取进程PID
- 根据窗口句柄来获取进程ID
- linux 打印相关 应用的进程,根据筛选条件 获取进程id 执行jstack 指令
- 根据进程ID获取进程名字
- 根据进程ID获取进程路径
- C++ Windows 下 根据进程名获取进程ID 以及该进程下所有窗口的句柄
- 根据进程ID获取exe路径
- VB6 根据进程ID(PID)获取窗体句柄
- 根据进程名字获取id并kill
- 根据进程ID获取其主线程ID
- 根据进程id获取主窗口句柄
- 根据进程名获取进程id
- VB6 根据进程ID(PID)获取窗体句柄
- linux 根据进程ID获取对应进程的信息
- linux根据进程名字获取进程ID
- 如何根据进程id获取该进程的主窗口句柄