127 points · by thunderbong · 7mo ago · 84 comments
(discussed at https://news.ycombinator.com/item?id=27994194)
Discovered this in college when I was shoulder surfing a coworker who always used the username Tyler. When he typed shutdown I called it out, and he said, "wait, it doesn't do that for you? I always assumed it said that for everyone and just replaced the username!".
(For those of you too young to know, it's a reference to an Aerosmith song)
Haha! Adequate amount of fun was provided, please resume regular man activities.
Which means you need to usually make it explicit to call them (man --abba or something) than something that "surprises" the user.
They fell out of favor when people realized they were a security issue, because it was a code path that rarely got tested.
In Star Trek: 25th Anniversary, we had a hidden animation of Captain Kirk's toupee jumping off his head and running out of the room. It was caught before release and they made us take it out since no one wanted to piss off William Shatner.
One very important section number is 5 - it's for file formats. So if you forget the crontab format, you need to invoke `man 5 crontab` to read about it.
Depends. If one is aware of the meaning of section numbers, that "(5)" is very obviously suggesting that there is a file format named "crontab" which is documented. It's also pretty reasonable to suppose that the command and the file format of the same name are related.
A novice might miss the convention and the connection. Man pages are not quite novice material.
If man was designed by someone with any taste at all it would at least give you a menu to select (1) crontab command, (5) crontab file format. Maybe we need a rewrite in Rust to fix that.
My goodness. Man was written on a paper teletype.
Why is it that the Rust community thinks that the solution to every flaw in an application is a rewrite in Rust?
man was designed at a time you likely can't conceive of.
Can you even imagine designing something that's being actively used and talked about a HALF CENTURY later?
https://imgur.com/a/kEkmRxx (link shows a screenshot of khelpcenter showing the different manpages available for crontab)
And maybe we need some versions: man version 1, man version 2 and so on. And of course, in the style of GTK, each one incompatible with all the others. Progress. /s
Incidentally, man --help on my machine shows "-k, --apropos equivalent to apropos", which isn't very useful. I know the two are equivalent, because they're on the same line of switches, what does it actually do?
With some further man digging, apropos is actually a separate program that looks through man page names/descriptions for the argument. Unless you run it with no arguments, in which case it just outputs "apropos what?" Instead of an actual error message like "No search term provided" or something
I have one of those physical binders, a volume of Section 3 for an AT&T 3B2, in the software section of my library downstairs. A beautiful artifact in every respect, of the level of quality you would imagine in the manual for a machine that cost $15,000 in the 80s.
.\" Take this out and a Unix Daemon will dog your steps from now until
.\" the time_t's wrap around.
.Pp
You can tune a file system, but you cannot tune a fish.
https://github.com/freebsd/freebsd-src/blob/main/sbin/tunefs...https://pubs.opengroup.org/onlinepubs/9799919799/idx/xcu.htm...
These would all be in section 1, if I am correct.
Run `apropos . | grep "(3)"`; you'll be surprised how many libraries come with man pages for their functions (e.g; curl).
Now I wonder if there are any IDEs that can automatically dial into these man pages and pull up documentation for functions?
apropos --sections=3 .
may be a better version of what you propose, depending on what you're looking for. On my system, this also gives me entries from sections like '3x' and '3ossl' and '3bsd'.Also, have you ever seen the DOS Borland IDE context sensitive help UX?
For in-depth doc, I do appreciate docset-based indexed search apps like Dash that can download and update comprehensive doc locally with greater performance and less internet dependency than internet only. There's even vim and nvim plugins to bring that to them too without leaving the terminal.
Step 2: Feel the urge to write an article about that
Writing down what you learn cements knowledge, and sharing what you write might help someone else.
info man
Ah that crap is/was so rage inducing!It is a stylistic convention to always add this number to any reference to a function, even if there is only one definition.
Perhaps the modern version of "man" should be a program you can talk to.
"Hey <agent>, use `man` to help answer these questions about grep"