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 CommandsUndocumented% documented
Total Priv'd Commands

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 CommandsUndocumented% documented
Total Window Commands
Total Priv'd Commands

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 – “  qmasterd” 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 CommandsUndocumented% documented
Total Priv'd Commands

and… almost 50% of SUID/SGID without a man page?


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.

Title: man-dir (0 click)
Size: 14 kB

Sorry, the comment form is closed at this time.

© 2012 trouble Suffusion theme by Sayontan Sinha