Listing Processes with ps
This is the third and last “command that should be simple, but isn’t” that is discussed here. The ps command lists processes and gives you an extraordinary amount of control over its operation.
The first thing to know is that ps is typically used with what are known as BSD-style parameters. In the earlier section “Finding Files by Searching with find,” we discussed UNIX-style, GNU-style, and X-style parameters (-c, --dosomething, and -dosomething, respectively), but BSD-style parameters are different because they use single letters without a dash.
So, the default use of ps lists all processes that you are running that are attached to the terminal. However, you can ask it to list all your processes attached to any terminal ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access