Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

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 Unixderives 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.)

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

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

checked OpenBSD and NetBSD; rewrote that paragraph to incorporate findings
Source Link
Warren Young
  • 73.4k
  • 17
  • 182
  • 172

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.

I originally claimed that FreeBSD behaves like Mac OS X here, which it does in many respectsOpenBSD, but further testing shows that it hews pretty closelyand NetBSD still hew to the old BSD line. I haven't tried OpenBSD or NetBSD, but I suspect they are the samestyle 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.)

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.

I originally claimed that FreeBSD behaves like Mac OS X here, which it does in many respects, but further testing shows that it hews pretty closely to the old BSD line. I haven't tried OpenBSD or NetBSD, but I suspect they are the same.

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

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

split FreeBSD and OS X info, since they behave differently after all; added NetBSD and OpenBSD speculation; added Solaris/OpenIndiana reportage
Source Link
Warren Young
  • 73.4k
  • 17
  • 182
  • 172

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 FreeBSD, while derivatives of the originalin general behaves most similarly to BSD Unix and still defaulting to BSDisms in their userland,— accepts both understand AT&Tish commands likeand BSDish ps -eaf flags. You tend

Solaris/OpenIndiana behaves this way, too, though this is less surprising because it has a mixed BSD and AT&T history.

I originally claimed that FreeBSD behaves like Mac OS X here, which it does in many respects, but further testing shows that it hews pretty closely to find systemsthe old BSD line. I haven't tried OpenBSD or NetBSD, but I suspect they are the same.

The older a Unix box is, the more likely it is that it accepts only understand one ps argument style in older systemsof flags. And even then, youYou 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.)

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 and FreeBSD, while derivatives of the original BSD Unix and still defaulting to BSDisms in their userland, both understand AT&Tish commands like ps -eaf. You tend to find systems that only understand one ps argument style in older systems. And even then, you can paper over the differences 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.)

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.

I originally claimed that FreeBSD behaves like Mac OS X here, which it does in many respects, but further testing shows that it hews pretty closely to the old BSD line. I haven't tried OpenBSD or NetBSD, but I suspect they are the same.

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

Source Link
Warren Young
  • 73.4k
  • 17
  • 182
  • 172
Loading