Sometime, probably in the paleozoic era, I wrote a little perl script I just came across again. At the time I was frustrated by commands in /bin or /usr/bin not having documentation, even on a cleanly installed system… I guess I would think if something is important enough to install on a system you might want to tell your users what it does… so I thought I’d look at how good/bad it was.
The little perl script below tries to run through the important command directories to find man pages in all the usual locations (or your MANPATH vars, also in /etc/man**{config,conf,cf} if set). The documentation tends to go down over time (as you install more commands in key places.)
On my current ubuntu system (a now ancient 9.x)
Total System Commands Undocumented % documented
2302 408 82.3
Total Priv'd Commands
30 3 90.0
Kinda blows. Almost 20% undocumented?
On the really blows side of things /usr/bin/screen.real was SGID, /usr/bin/X SGID/SUID, and /usr/bin/kde_init was SUID. How could you put a SUID program and not put a frickin’ man page?
Back in the day I used to have a table I kept with this stuff with various OS’s, but I can’t find it now. As I recall commercial systems (such as solaris, etc) did tend to document more. Well, what about my mac? Snow leopard mac (my script doesn’t look at things in /Application and /System… but there’s some interesting stuff there too, hmm; until then just looking at traditional /usr/bin, /bin, etc. types):
Total System Commands Undocumented % documented
1218 64 94.7
Total Window Commands
118 11 90.7
Total Priv'd Commands
27 0 100
Well, 5% isn’t too bad. Note the separate window commands; it used to be more interesting, but at least under my ubuntu /usr/X11R6/bin is just linking back to /usr/bin and all the window stuff has been mashed in the general executable areas.
Although… on my personal system (I ran this on a fresher version) there’s actually one undocumented SUID: /usr/sbin/qmasterd? Hmm – “site:apple.com qmasterd -site:discussions.apple.com -site:discussions.info.apple.com” gives me 6 hits in english. None document qmasterd, although it looks like part of the compressor package. Shame, apple.
And… just in, a Centos 5.6, the Red Hat enterprise clone addition.
Total System Commands Undocumented % documented
2611 738 71.7
Total Priv'd Commands
30 16 46.7
and… almost 50% of SUID/SGID without a man page?
/sbin/umount.nfs4
/usr/bin/same-gnome
/usr/bin/gnibbles
/usr/bin/iagno
/usr/bin/gnotravex
/usr/bin/gataxx
/usr/bin/gtali
/usr/bin/mahjongg
/usr/bin/gnomine
/usr/bin/gnotski
/usr/bin/gnobots2
/usr/bin/glines
/usr/sbin/userisdnctl
/usr/sbin/ccreds_validate
/usr/libexec/libvirt_proxy
OK, you might say mount.nfs4 & umount.nfs4 are the same as *mount.nfs, which is documented… but they actually are different programs, with different sizes and at least some different code. Hmm, 14 unique and 17 total mount commands in /sbin. Most look like games – do we still need the SGID bit on those? :) And… “find / -perm -4000” gives two more undocumented ones, /usr/*/nspluginwrapper (actually 2 of those), and /lib64/dbus-1/dbus-daemon-launch-helper.
So down to only 5 or more. And those 700+ others.
[attachments]
Sorry, the comment form is closed at this time.