~/ learn/ comp-325/ cards/ Three branches, one root, and why POSIX exists
1 of 5

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

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e3ff8098-a2ee-494e-a245-f0f528dc1cac/flashcard utf-8 LF