OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

Sending Signals To Multiple Processes With killall

It's also possible to send signals to multiple processes matching a specified program or username by using the killall command. Here is the syntax:


killall [-u user] [-signal] name...

killall [-u user] [-signal] name...


To demonstrate, we will start a couple of instances of the xlogo program and then ter- minate them:



[me@linuxbox ~]$ xlogo &

[1] 18801

[me@linuxbox ~]$ xlogo &

[2] 18802

[me@linuxbox ~]$ killall xlogo

[1]- Terminated xlogo

[2]+ Terminated xlogo

[me@linuxbox ~]$ xlogo &

[1] 18801

[me@linuxbox ~]$ xlogo &

[2] 18802

[me@linuxbox ~]$ killall xlogo

[1]- Terminated xlogo

[2]+ Terminated xlogo


Remember, as with kill, you must have superuser privileges to send signals to pro- cesses that do not belong to you.


Top OS Cloud Computing at OnWorks: