216
submitted 1 week ago by cybercitizen4@lemm.ee to c/asklemmy@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] pixelscript@lemm.ee 27 points 6 days ago

There are exactly three kinds of manpages:

  1. Way too detailed
  2. Not nearly detailed enough
  3. There is no manpage

I will take 1 any day over 2 or 3. Sometimes I even need 1, so I'm grateful for them.

But holy goddamn is it awful when I just want to use a command for aguably its most common use case and the flag or option for that is lost in a crowd of 30 other switches or buried under some modal subcommand. grep helps if you already know the switch, which isn't always.

You could argue commands like this don't have "arguably most common usecases", so manpages should be completely neutral on singling out examples. But I think the existence of tl;dr is the counterargument.

Tangent complaint: I thought the Unix philosophy was "do one thing, and do it well"? Why then do so many of these shell commands have a billion options? Mostly /s but sometimes it's flustering.

[-] wuphysics87@lemmy.ml 8 points 6 days ago

tldr is the first of 4 ways I rtfm. Then -h, man, and then the arch wiki

[-] vrighter@discuss.tchncs.de 4 points 6 days ago

i never use man at all. It's just too confusing.

[-] wuphysics87@lemmy.ml 5 points 6 days ago

I can appreciate that. Appologies if you know this already, but just don't like them. Here are some tips.

It helps a lot to get title/subtitle/flag highlighting. By default man pages are hard to use simply because of how dense they are. It's much easier to skim when you can separate the parts you are looking for up front from the text.

Don't forget '/', 'n', and 'N'. First way to use man pages more effectively is to search them easily. And you can search via regex. Often I'm looking for more info on a particular flag. So I'll press '/' followed by '^ *-g'. For a g flag.

Take notes on the side. It saves you time later. Your future self will thank you. And you learn a lot by skimming them.

Man pages can be intimidating/confusing, but, imho, it's worth training that skill. Even if you are slower up front, it's totally worth it.

[-] vrighter@discuss.tchncs.de 2 points 6 days ago* (last edited 6 days ago)

thanks for the advice. I knew about the search feature, but sometimes the stuff you need isn't even on the page. I have no idea how to find what I need when it's not in "man cmdname" how am I supposed to know that the feature i want has a dedicated page?

how could I find certain commands if i didn't already know it was a shell builtin and not a command? It's not like you get a manpage saying "this is not a command". And even if i did have the idea to open the bash page, it's still useless, because builtins are their own dedicated page. That sort of stuff. It rarely ever makes things easier for me.

edit, it is occasionally useful phen I have already found what I want on google and just want some in depth details.

[-] JackbyDev@programming.dev 1 points 5 days ago

If something is a bash built-in run help blah for it's "man page"

But yeah, man pages tick me off. Wait until you learn that there are sometimes more than one per command. I have to Google which page is which because they're all for specific things. man foo is the equivalent of man 1 foo. What's annoying is that the few times I've seen something referenced on another page the entry usually just says something like it's on "the relevant man page" rather than just telling you exactly which.

[-] vrighter@discuss.tchncs.de 1 points 5 days ago

ok but that still entails trying random things until i find it. If I didn't already know it was a builtin i wouldn't know to search there. The bash thing was just an example. I have learned this stuff since i encountered the problem. This is just me recollecting my experience of trying to use man

[-] wuphysics87@lemmy.ml 1 points 6 days ago

Unfortunately, sometimes (often) there is no man page for what you are looking for. So if you get a page not found, that's usually the case. You can usually find associated pages all the way at the bottom. That helps when what you are looking for isn't a command, but a reference. I don't remember exactly where it is, but man pages are stored in a directory. Probably /etc or /usr. You can always dump that list into fzf or use grep to search to see if there is a page for what you are looking for. It's not a perfect system by any means, but it's a good one to have in your toolbelt.

this post was submitted on 21 Sep 2024
216 points (96.6% liked)

Asklemmy

43460 readers
693 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS