Belajar Sendiri

Commands

pgrep

pgrep [-f] <name>

Risk: Safe

What it does

Prints the PIDs of processes that match a name.

When to use it

To find the number kill needs.

Example

$ pgrep -f stock-check

The PID of the stuck stock script.