Linux 使用 pgrep 找出 Processes 所有 pid

平常要找某 Process (Ex: Apache) 的 Pid,都是 ps aux | grep apache 然後在搭配 awk 來把 pid 撈出來。

上述方式撈出來的這些 pid 常常會有一個是 ps 的 pid,而且撈的方式還蠻辛苦的~ 使用 pgrep 可以比較輕鬆解決~

閱讀全文〈Linux 使用 pgrep 找出 Processes 所有 pid〉