Pretty much all Linuxes use GNU versions of the original core Unix commands like ps
, which, as you've noted, supports both BSD and AT&T style options.
Since your stated goal is only compatibility among Linuxes, that means the answer is, "It doesn't matter."
Embedded and other very small variants of Linux typically use BusyBox instead of the GNU tools, but in the case of ps
, it really doesn't affect the answer, since the BusyBox version is so stripped down it can be called neither AT&Tish nor BSDish.
Over time, other Unixy systems have reduced the ps
compatibility differences. Mac OS X — which derives indirectly from BSD Unix and in general behaves most similarly to BSD Unix still — accepts both AT&Tish and BSDish ps
flags.
Solaris/OpenIndiana behaves this way, too, though this is less surprising because it has a mixed BSD and AT&T history.
FreeBSD, OpenBSD, and NetBSD still hew to the BSD style exclusively.
The older a Unix box is, the more likely it is that it accepts only one style of flags. You can paper over the differences on such a box the same way we do now: install the GNU tools, if they haven't already been installed.
That said, there are still traps. ps
output generally shouldn't be parsed in scripts that need to be portable, for example, since Unixy systems vary in what columns are available, the amount of data the OS is willing to make visible to non-root users, etc.
(By the way, note that it's "BSD vs. AT&T", not "BSD vs. Unix". BSD Unix is still UNIX®. BSD Unix shares a direct development history with the original AT&T branch. That sharing goes both ways, too: AT&T and its successors brought BSD innovations back home at several points in its history. This unification over time is partly due to the efforts of The Open Group and its predecessors.)
ps
argument styles, which one (BSD or Unix) is POSIX, then? – Jarl Apr 29 '16 at 07:50