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 (
-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 ...