Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 2141  / 3 Years ago, sun, august 1, 2021, 11:59:25

Why are there two or more different versions of a manpage in http://manpages.ubuntu.com



For example, looking at the manpage of at, you can find two, one that is provided by the manpages-posix package [ref]. And another that is provided by the at package itself [ref].

The same is valid for other packages as well like ls.1 and ls.1posix and ls.1plan9.



What I understood from a quick search is that posix means that it's a standard specified by IEEE to maintain compatibility between different OS [ref].



So does Ubuntu has its own implementation of a program?


More From » manpage

 Answers
4

POSIX stipulates a number of commands are available (see the Shell & Utilities volume) and that they work in a certain way. Here are those commands:




admin alias ar asa at awk basename batch bc bg break c99 cal cat cd cflow chgrp chmod chown cksum cmp colon comm command compress continue cp crontab csplit ctags cut cxref date dd delta df diff dirname dot du echo ed env eval ex exec exit expand export expr false fc fg file find fold fort77 fuser gencat get getconf getopts grep hash head iconv id ipcrm ipcs jobs join kill lex link ln locale localedef logger logname lp ls m4 mailx make man mesg mkdir mkfifo more mv newgrp nice nl nm nohup od paste patch pathchk pax pr printf prs ps pwd qalter qdel qhold qmove qmsg qrerun qrls qselect qsig qstat qsub read readonly renice return rm rmdel rmdir sact sccs sed set sh shift sleep sort split strings strip stty tabs tail talk tee test time times touch tput tr trap true tsort tty type ulimit umask unalias uname uncompress unexpand unget uniq unlink unset uucp uudecode uuencode uustat uux val vi wait wc what who write xargs yacc zcat




GNU coreutils (what GNU/Linux distributions ship) contains all these commands but they have developed away from the standard POSIX base over time. Some offer better features. Some work in slightly different ways. These coretils versions are what the standard man pages cater for.



But it is still desirable to write scripts that work on many platforms. For example, if you tried to use extended coreutil functionality of grep on OSX, you'd run into syntax errors. And this is why knowing how the POSIX version works is desirable. Install manpages-posix and you know everything.



It's also essential to know this stuff if you're planning on improving GNU coreutils.



Plan9 is different yet again. It was never designed to be POSIX compatible. It strives for an amount of POSIX compatibility through a emulation layer and the man pages for it are again, there as documentation to let you know what you can use.


[#29585] Tuesday, August 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
needstar

Total Points: 268
Total Questions: 108
Total Answers: 117

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;