pgrep

From NetBSD Wiki

Jump to: navigation, search

pgrep(1) - find or signal process by name

This command is similar to pkill, only it returns the PIDs of matched processes. The source is the same as pkill.

% pgrep sshd
8577
26612
7094
9264
8797
1019
233

Processes can be signalled as with pkill by issuing:

% pgrep sshd | xargs kill

See also

View source code (Please report any bugs or suggestions here).

Retrieved from "http://wiki.netbsd.se/pgrep"
Personal tools