You are logged in to a Solaris 11 machine and want a full listing of every process on the system. Which spelling does its `ps` accept?
You are logged in to a Solaris 11 machine and want a full listing of every process on the system. Which spelling does its `ps` accept?
Answer
`ps -ef` — the System V spelling, which is also the POSIX one
Options - A. `ps -ef` — the System V spelling, which is also the POSIX one - B. `ps aux` — the BSD spelling - C. Either one; Solaris accepts both dialects - D. `ps --all` — the GNU long-option spelling Why - A. Correct. Solaris is a System V descendant, and `-e -f` is what POSIX specifies, so this line is also the portable answer. - B. That is FreeBSD and macOS. Solaris rejects `aux` as an unknown operand. - C. Linux accepts both, because `procps-ng` was written to. Solaris was not, and assuming otherwise is exactly the Linux-only habit this course warns about. - D. GNU long options belong to the Linux tooling. Solaris `ps` has none.
Sarwar & Koretsky 3e ch1 §1.6, §1.8–1.9