Another fun related one: If your username is Tyler and you run shutdown, instead of the usual message it will say "Oh, good morning Mr. Tyler, going down?"
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)
Personally I think ubiquitous software is even more important to have Easter eggs, because they're the most widely distributed, and we want as much joy as we could possibly have, before you know.
My favorite piece of man trivia is from the source of the tunefs BSD man page, which contains:
.\" 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.
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.
In fact, the only reference to crontab(5) is in the SEE ALSO section (on my version anyway), but that doesn't say why you might want to see crontab(5), just that it exists. That is spectacularly useless
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.
Hell, you don't even have to have a handle on what the section numbers mean for these things to be useful. The appearance of something in a "SEE ALSO" section indicates that the manual page author thought that that thing was both related to the thing being documented and worth reading if the current man page didn't answer all of your questions.
I can't count the number of times that following the trail laid out by 'SEE ALSO' sections a step or three has lead me to the exact thing that I never knew I needed to be using. Chasing those sections down is almost always well worth the three to ten minutes spent.
And, like, if one is expecting a man page to cover everything even vaguely related to what it documents in detail, and one doesn't feel one has ten minutes to spend reading things that people thought were important to bring to your attention... well, I guess one could go ask an LLM to slop out some related words. That'll probably take less than ten minutes, though correctness is not at all guaranteed.
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
> Incidentally, man --help on my machine shows "-k, --apropos equivalent to apropos", which isn't very useful.
That's your hint to execute either 'man apropos' or 'man man'. Both tell you in detail what the flag and utility do.
You seem likely to be very disappointed in the '-h'/'-H' output of utilities from the BSD tradition. The output is often a list of all of the (almost always exclusively short) options presented as a sea of characters... and nothing else.
That is incredibly stupid. A documentation system designed by someone who doesn't understand how people use documentation.
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.
Interestingly, the section doesn't actually have to start with a number. TCL man pages use the 'n' section and 'man' resolves them just fine despite the ambiguity. Conversely, manpage names can also start with numbers, although this is rare (I found only one such example: man 30-systemd-environment-d-generator)
That may "answer" a specific question. And all llms can do as they include manpages in training data (and any Agentic thing can search) however the value in reading documentation is that one can find different angles by learning about different options, which allow tontackle problems from a different perspective. The answer to a question is constrained by assumptions which are part of the question.
(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.
They fell out of favor when people realized they were a security issue, because it was a code path that rarely got tested.
Which means you need to usually make it explicit to call them (man --abba or something) than something that "surprises" the user.
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.
I can't count the number of times that following the trail laid out by 'SEE ALSO' sections a step or three has lead me to the exact thing that I never knew I needed to be using. Chasing those sections down is almost always well worth the three to ten minutes spent.
And, like, if one is expecting a man page to cover everything even vaguely related to what it documents in detail, and one doesn't feel one has ten minutes to spend reading things that people thought were important to bring to your attention... well, I guess one could go ask an LLM to slop out some related words. That'll probably take less than ten minutes, though correctness is not at all guaranteed.
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
That's your hint to execute either 'man apropos' or 'man man'. Both tell you in detail what the flag and utility do.
You seem likely to be very disappointed in the '-h'/'-H' output of utilities from the BSD tradition. The output is often a list of all of the (almost always exclusively short) options presented as a sea of characters... and nothing else.
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?
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?
Also, have you ever seen the DOS Borland IDE context sensitive help UX?
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.
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"