Hit Squad
The pkill command, which is an abbreviation for the Linux "hit squad," understands the same options as pgrep, and is run against processes by specifying a signal in the same way as kill:
pkill -19 ssh
Another practical aspect is that system administrators can target another user's processes by setting the -u flag (see Listing 4). To do so, root simply passes in the username as an option.
01 # pgrep -lfu petrosilie
02 7682 sleep 4000000000
03 7792 bash
04 [...]
05 # pkill -19 -u petrosilie
Heike Jurzik studied German, Computer Science and English at the University of Cologne, Germany. She discovered Linux in 1996 and has been fascinated with the scope of the Linux command line ever since. In her leisure time you might find Heike hanging out at Irish folk sessions or visiting Ireland.
Comments