博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
杀掉所有用户进程,保留当前进程: killall5
阅读量:4210 次
发布时间:2019-05-26

本文共 1109 字,大约阅读时间需要 3 分钟。

本想打算自己造个轮子。发现linux已经有一个圆轮子了

KILLALL5(8)                                                                           Linux System Administrator's Manual                                                                          KILLALL5(8)NAME       killall5 -- send a signal to all processes.SYNOPSIS       killall5 -signalnumber [-o omitpid[,omitpid..]]  [-o omitpid[,omitpid..]..]DESCRIPTION       killall5  is  the  SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it won't kill the shell that is running the script it was       called from. Its primary (only) use is in the rc scripts found in the /etc/init.d directory.OPTIONS       -o omitpid              Tells killall5 to omit processes with that process id.NOTES       killall5 can also be invoked as pidof, which is simply a (symbolic) link to the killall5 program.EXIT STATUS       The program return zero if it killed processes.  It return 2 if no process were killed, and 1 if it was unable to find any processes (/proc/ is missing).SEE ALSO       halt(8), reboot(8), pidof(8)

转载地址:http://swrli.baihongyu.com/

你可能感兴趣的文章
静态成员变量
查看>>
c++编译器对属性和方法的处理机制一
查看>>
编译器对属性和方法的处理机制之二
查看>>
运算符重载入门技术推演
查看>>
运算符重载的两种方法
查看>>
定义运算符重载函数名的步骤
查看>>
重载赋值运算符
查看>>
面向对象模型this指针练习
查看>>
友元类与友元函数
查看>>
括号运算符重载
查看>>
为什么不要重载逻辑&&和逻辑||运算符
查看>>
运算符重载之数组实例的应用
查看>>
派生类访问控制
查看>>
类型兼容性原则
查看>>
继承与组合混搭情况下,构造和析构调用原则
查看>>
继承中的同名成员变量处理方法
查看>>
派生类中的static成员
查看>>
多继承的应用
查看>>
虚继承的应用
查看>>
c++中的多态
查看>>