beyondmac.com|comments, answers, etc.

Home Contact About Subscribe(RSS)

The Book:

Buy Mac OS X Leopard: Beyond the Manual from Amazon, or check out the Apress website for more information.

Categories:

Bookmarks:

Powered by WordPress

ps clarification | December 17, 2007

I just received my author copies of the book and discovered the first issue. In chapter 18, page 302 where I write about the ps command I write:

“The most common options are -a, -u, and -x (so common, in fact, that you can issue them without the -).”

This is actually no longer exactly true. The latest version of Leopard has changed the ps command and the -u option now is a switch to select the processes of a specific user ID (though the man page is a bit unclear about this, and the command doesn’t seem to work as expected).

That said, the command used in the book ( “ps aux” ) still functions as expected (do to some compatibility magic), however if you use “ps -aux” you will get an error. The proper new way to get the expected results would be to use “ps -ajx” .

Also, it seems for the moment neither the -u or -U options (the -U option is covered on page 303) work as they should at all. I assume this will be fixed with an update, but who knows

It seems the -u and -U options do work however if you use them with the -a (or -A) options, then they (-a or -A) will take precedence. So, rather then “ps aux -U user” (as I used as an example in my book) you can use “ps -jxU user” instead.