4 ms·
I'm aware of GBU's preference for info but systems vary. Just to use your example, I'm typing this on Slackware and when I pull up man tar there are three examp
by smhenderson 7y ago
I'm aware of GBU's preference for info but systems vary. Just to use your example, I'm typing this on Slackware and when I pull up man tar there are three examples, right after Synopsis and Description. Examples for extracting, both gzipped and regular archives, and creating a tar file are given.
And when I shell into an OpenBSD server their man page for tar has several examples at the bottom of the page.
Man, IMO, is a lot like Linux distros in that they are not all created equal, pull from a lot of different sources and can be inconsistent if you're not looking at the correct ones for whatever system you are on.
I too think TLDR is a good idea but that's no reason not to encourage that some of their work be ported back to man pages in their examples' sections.
- topspin 7y agoA quick survey of GNU tar man pages, by program version and the date that appears in the page itself: 1.23 March, 2012: no examples (RHEL 6) 1.26 March, 2015: no examples (OpenSUSE 13.1) 1.26 February, 2016: no examples (CentOS 7) 1.29 March, 2016: limited examples (Ubuntu 1804) The last has no actual "EXAMPLES" section in the man page; only some incidental examples appearing among a discussion of "Option styles." I suspect this is also what you see; it's in the same position in the page. So there is some evidence that examples aren't entirely prohibited in GNU man pages, at least in recent years. Progress, I guess. The latest work on this man page (release 1.32) shows no further progress. TLDR goes well beyond those incidental examples and is far closer to what I'd hope to see; first class, worked example forms eagerly supplied. Without suffering info.
- smhenderson 7y agoFair enough and as mentioned this was Slackware and the maintainer, Patrick, is known to have a fondness for BSD so maybe his influence can be seen here. For what it's worth the Slackware page does have an Examples section so it's not exactly what your seeing on Ubuntu but the examples themselves may be the same. As mentioned there are only three but they are probably the three examples needed most by 95% of users. And, since I wasn't clear in my previous post, I absolutely agree about info. It may have been a nice thought when hypertext based systems were young and new things needed to be tried but it should have quietly died by now IMHO.