when do you usually use the man page for a complex command line tool to answer a question you have?
-
@b0rk@social.jvns.ca @simontatham@hachyderm.io another aspect: the man page on your machine matches the software on your machine
the online docs are probably for the very latest version, which is probably not the one you're running
(I used to make this argument on IRC channels a couple of decades agoโฆ so yes to the "old people" aspect, too)@dakkar @b0rk @simontatham Another problem with Googling the answer is that most of the content it finds is for Ubuntu, and I don't have Ubuntu.
-
i'm very curious about everyone who says "I'd look there first", if I want to figure out how to do something new I think I'll usually google how to do it rather than look at the man page, and then maybe later look at the man page to look up the details
(I've gotten enough of these answers:
- "I like that man pages don't require changing context"
- "with the man page I know I have the right version of the docs")@b0rk
I'm not sure how I choose, I _think_ I use man page first if I need just a specific detail like the name of an option I know is there. If I'm not sure of what I'm looking for, I go to Google. Man pages usually are not very good in introducing/explaining use cases, so not a good starting point, but for a specific detail, they tend to be predictably usable. -
when do you usually use the man page for a complex command line tool to answer a question you have? (like git, openssl, rsync, curl, etc)
(edit: no need to say "i use --help then man")
@b0rk Voted "other" as it depends highly on the context for me? Like, what tool, what kind of system am I running on, and so forth.
-
@simontatham yea i think part of the reason I'm newly interested in man pages right now is that search engines are so much worse than they used to be
@b0rk @simontatham You've DEFINITELY given me something to think about.
In rsync's case in particular, I go to the HTML version of the man page on Samba's website and look it up there. I think if the man page was easier to invoke outside of a terminal window with browser/editor bindings (read: CTRL+F), I train my brain to use the local copy.
-
@b0rk
It used to be --help, and I sometimes still use it (but frustrated from browsers etc. that don't comply to the convention) - no need to state that, but I found something more interesting:
Many tools come with bash completion when installed through a package manager.
So the first thing I really try nowadays is:
- type a few promising characters
- hit TAB
- if unsuccessful, delete some, type some new.
If this won't work, I might try the man page - or a google search, it depends.@b0rk
Now that I read your second question, I must also mention "tldr".
It often has a useful selection of those use cases that most users only ever use. If I want to something more advanced I have to research it somewhere else, anyway. -
when do you usually use the man page for a complex command line tool to answer a question you have? (like git, openssl, rsync, curl, etc)
(edit: no need to say "i use --help then man")
@b0rk man is my go-to tool when I sorta already know what I'm trying to do but can't quite remember what the arguments look like
-
i'm very curious about everyone who says "I'd look there first", if I want to figure out how to do something new I think I'll usually google how to do it rather than look at the man page, and then maybe later look at the man page to look up the details
(I've gotten enough of these answers:
- "I like that man pages don't require changing context"
- "with the man page I know I have the right version of the docs")@b0rk So, this is a conditionalized problem, my P(man page first | man page exists) is high โ because if it's a new tool, and it has a man page, usually the man page is *actually quite good*, and actually fulfills the role of "manual" better than most (say, GNU coreutils) manpages, which just are slightly more in-depth versions of `tool --help` (without the actual structural difference that would make them manuals, as opposed to CLI option references).
Lots of tools don't ship with manpagesโฆ -
@b0rk So, this is a conditionalized problem, my P(man page first | man page exists) is high โ because if it's a new tool, and it has a man page, usually the man page is *actually quite good*, and actually fulfills the role of "manual" better than most (say, GNU coreutils) manpages, which just are slightly more in-depth versions of `tool --help` (without the actual structural difference that would make them manuals, as opposed to CLI option references).
Lots of tools don't ship with manpagesโฆ@b0rk โฆ anymore (`man mlr` doesn't work, `mlr --help` directly links to its docs website). And for more complex tools, that's probably fair โ you're not going to learn how to use a massive tool from man pages (examples of "this should not be one man page" is `man gcc`,`man bash, `fish-doc`, `libuv` or `man mplayer`), but for smaller things, authors who sit down to write a man page for modern tools typically actually *think* about what is a sensible thing to put in that format.
-
@b0rk โฆ anymore (`man mlr` doesn't work, `mlr --help` directly links to its docs website). And for more complex tools, that's probably fair โ you're not going to learn how to use a massive tool from man pages (examples of "this should not be one man page" is `man gcc`,`man bash, `fish-doc`, `libuv` or `man mplayer`), but for smaller things, authors who sit down to write a man page for modern tools typically actually *think* about what is a sensible thing to put in that format.
@b0rk In fact, that's been so often the case for me that I tend to think "OK, for 5 minutes of reading instead of 30 s of searching, I can actually learn how this generally works, is that worth 4min 30s? yes!" and then read the man page.
-
@b0rk In fact, that's been so often the case for me that I tend to think "OK, for 5 minutes of reading instead of 30 s of searching, I can actually learn how this generally works, is that worth 4min 30s? yes!" and then read the man page.
@b0rk (Neither "not changing context" nor "same version" are good arguments, imho. I *want* to have the documentation in a different thing than the terminal I'm currently working in. What use is modern screens else. Tools rarely change so rapidly that the things I need to learn to get started would immediately outdate, and if they do, it's usually a good sign for that tool being pretty specialized and me probably needing to read more)
-
also it just occurred to me that the one time I wrote a command line tool (https://rbspy.github.io/) I didn't write a man page for it, I made a documentation website instead. I don't remember even considering writing a man page, probably because I rarely use man pages
(not looking to argue about whether command line tools "should" have man pages or not, just reflecting about how maybe I personally would prefer a good docs website over a man page. Also please no "webpages require internet")
@b0rk I've written --help output, but I've never known how to write a man page.
-
@aburka that's what fish does! Well it just opens the HTML file in the browser, no need to start a local web server for those docs
-
@b0rk the mentioned utilities, mostly man page. ffmpeg? Straight to search.
@danlyke @b0rk FFmpeg options and arguments are a language in their own right. Knowledge about video formats is more trade knowledge than conceptual knowledge, and I've always had difficulty getting motivated to study that kind of stuff, so I look to the web for information about how to use ffmpeg, and yeah, I use it as cargo cult code. I bookmark them under "ffmpeg-recipes".
-
when do you usually use the man page for a complex command line tool to answer a question you have? (like git, openssl, rsync, curl, etc)
(edit: no need to say "i use --help then man")
@b0rk "That depends..." Isn't a great answer, but that's the case. Reference for command line options? Man page first. Example usage and reference applications? Google search, AI tools. Project website first, man page examples after. Except if it's a bash question, then man page first.
-
when do you usually use the man page for a complex command line tool to answer a question you have? (like git, openssl, rsync, curl, etc)
(edit: no need to say "i use --help then man")
@b0rk if we include --help in this, the answer is โwhenever I know a tool can do a thing but canโt remember howโ. If I donโt know which tool can do a thing, I search the internet rather than using apropos or similar.
I donโt often use actual man pages (except man bash), because Iโve been conditioned by how many tools donโt have them: in theory everything in Ubuntu should, because itโs from Debian which also should, but thereโs lots of man 7 undocumented in there so I was Pavlovโed away from it. -
@b0rk if we include --help in this, the answer is โwhenever I know a tool can do a thing but canโt remember howโ. If I donโt know which tool can do a thing, I search the internet rather than using apropos or similar.
I donโt often use actual man pages (except man bash), because Iโve been conditioned by how many tools donโt have them: in theory everything in Ubuntu should, because itโs from Debian which also should, but thereโs lots of man 7 undocumented in there so I was Pavlovโed away from it.@b0rk but I tend to use --help before searches, because as you and others say, searches are so clogged with shit these days that theyโre unreliable. Although itโs reassuring to see how often manpages.ubuntu.com is at the top of the list.
-
i'm very curious about everyone who says "I'd look there first", if I want to figure out how to do something new I think I'll usually google how to do it rather than look at the man page, and then maybe later look at the man page to look up the details
(I've gotten enough of these answers:
- "I like that man pages don't require changing context"
- "with the man page I know I have the right version of the docs")@b0rk reading the manpage I also accidentally learn stuff I wasn't looking for. Oftentimes I learn that what I was planning to do was the wrong approach and learn how to do it better.
Reading the man page also makes the knowledge "sink in" more for me, so next time I won't have to look it up.
That's why I read the --help and the manpage first. Your brain might work differently, I'm not trying to tell you you should as well.
-
@b0rk for some commands I know the manpage is decent and I'll look there. for others I know it doesn't exist or is crap, so I'll check -h or just search online. I sometimes reach for it first on new commands, sometimes not. no real rhyme or reason, mostly just whatever direction my brain goes in the moment.
I do, however, hate certain manpages with a fiery passion. like builtins being one giant manpage that you can't search because it looks for results in all builtin commands. hateful design.
@gsuberland @b0rk pet hate: when you type <command> -h, and it responds along the lines of โ-h is not a recognised option, use -? for helpโ (or vice versa).
Thatโs some passive aggressive bullshit, just give me the damn help options ๐คจ
-
i'm very curious about everyone who says "I'd look there first", if I want to figure out how to do something new I think I'll usually google how to do it rather than look at the man page, and then maybe later look at the man page to look up the details
(I've gotten enough of these answers:
- "I like that man pages don't require changing context"
- "with the man page I know I have the right version of the docs")@b0rk Assuming the man page docset is properly curated, it should be a comprehensive an authoritative answer to how the tool works.
Caveat: I spent years in a techpubs department writing and maintaining UNIX man pages. I have strong opinions!
-
i'm very curious about everyone who says "I'd look there first", if I want to figure out how to do something new I think I'll usually google how to do it rather than look at the man page, and then maybe later look at the man page to look up the details
(I've gotten enough of these answers:
- "I like that man pages don't require changing context"
- "with the man page I know I have the right version of the docs")@b0rk I guess it depends on what you mean by "figure out how to do something"
If I've already figured out what command/function to use but am unsure of the details, man pages are just faster. And if that doesn't help, I'll look elsewhere
If I don't know what man page to even look at, then I'll search first