Files
tldr/pages.zh/osx/ps.md

28 lines
476 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ps
> 关于正在运行的进程的信息。
> 更多信息:<https://keith.github.io/xcode-man-pages/ps.1.html>。
- 列出所有正在运行的进程:
`ps aux`
- 列出所有正在运行的进程,包括完整的命令字符串:
`ps auxww`
- 搜索匹配某个字符串的进程:
`ps aux | grep {{string}}`
- 获取进程的父进程 ID
`ps -o ppid= -p {{pid}}`
- 按内存使用量排序进程:
`ps -m`
- 按 CPU 使用量排序进程:
`ps -r`