Live data from Hacker News

Number in man page titles e.g. sleep(3)

lalitm.com

21–30 of 85 posts

Re: Number in man page titles e.g. sleep(3)

#21

> (... less common section numbers) 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.

... because if you do `man crontab` you get section 1, which does not document the crontab fields.

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

Re: Number in man page titles e.g. sleep(3)

#22
For me man(3) is the most interesting of them all.

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?

Re: Number in man page titles e.g. sleep(3)

#23

Earlier quoted context omitted.

... because if you do `man crontab` you get section 1, which does not document the crontab fields.

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.

It does that, depending on implementation.

Re: Number in man page titles e.g. sleep(3)

#25

> (... less common section numbers) 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.

... because if you do `man crontab` you get section 1, which does not document the crontab fields.

man -k crontab is the real trick here. shows both sections so you don't have to already know the number exists.

Re: Number in man page titles e.g. sleep(3)

#26

Earlier quoted context omitted.

... because if you do `man crontab` you get section 1, which does not document the crontab fields.

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.

> If man was designed by someone with any taste at all it would at least give you a menu [...]

My goodness. Man was written on a paper teletype.

Re: Number in man page titles e.g. sleep(3)

#27
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.
https://github.com/freebsd/freebsd-src/blob/main/sbin/tunefs...

Re: Number in man page titles e.g. sleep(3)

#28
post #9
post #7

If you like man trivia (and why else would you be reading this?) you could check out the top comment at https://unix.stackexchange.com/questions/405783/why-does-man... (discussed at https://news.ycombinator.com/item?id=27994194 )

Reading this makes me wonder if Easter eggs are ever appropriate for something as ubiquitous as man.

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.

Re: Number in man page titles e.g. sleep(3)

#29
post #27

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. https://github.com/freebsd/freebsd-src/blob/main/sbin/tunefs...

I guess the joke is you can scale a file system or a fish, but can only tune a file system?
Post reply on HN