man: Man, oh man

I didn’t include man in my traversal of the M section back in January, and as rameses pointed out later in an e-mail, that was an oversight. One of the best parts of man, he said (she said?), was in this:

man --html=elinks man

which on most systems will give you this:

2014-07-23-6m47421-man-01-elinks

Ta-da, a man page with clickable links, and navigation that you’ll know and love. If you want to take that home to meet your parents, I can tell you that the Arch version dumps that file into /tmp in an individual folder, usually with a filename that resembles your original command.

Copy that to anywhere you like, and you have a permanent local man page accessible by browser. And you thought all those online manpage collections were Internet wizards, and here they are just script kiddies taking advantage of a built-in feature of man. :\

But wait, there’s more. 😯

man -t man

By itself that’s only partially useful, but jam the results through our old friend ps2pdf.

ps2pdf man.ps

And … bingo:

2014-07-23-6m47421-man-02-acroread

Yeah, I know: Acrobat Reader. I did that just to annoy you. Did it work? 😈

Now man is clever enough to dump to PostScript file, and of course from there, we can generate spiffy PDF versions of our favorite documentation. Print those out, and you’ll never need digital help again. Or you can study for the edX Linux course next month. πŸ˜‰

rameses also mentioned it was possible to cue up man pages from within emacs, and I had to hunt down the answer to that one. Turns out just a simple M-x man from within emacs will prompt you for a title, which in turn yields something like this:

2014-07-23-6m47421-man-03-emacs

Nifty. The only way I know of to do that in vim is man man | vim - which is a bit brutish. Giving vim :!man man doesn’t count, since that’s just dropping back to the shell, and cues most (my $PAGER) as a result. If you know of a better way, please let me know. πŸ˜‰

In any case, rameses was right: It’s worth checking out man just for its ability to generate alternative formats. I promise to pay better attention next time. πŸ˜‰

6 thoughts on “man: Man, oh man

  1. klg

    :%!man man
    Note the % (or you can use any other range to replace it with manual page).

  2. Pingback: cheat, cheat, cheats and cheat: So many cheaters | Inconsolation

  3. Pingback: Bonus: A massive missive of omission | Inconsolation

  4. Pingback: bropages: It’s like man, bro | Inconsolation

Comments are closed.