3 ms·
One major thing is that there is so much inconsistency. Several posters here have commented on how find is a terrible tool with weird syntax. It's not actuall
by LukeShu 11y ago
One major thing is that there is so much inconsistency.
Several posters here have commented on how find is a terrible tool with weird syntax. It's not actually terrible or weird, it's just different... because it pre-dates most everything else.
And it is hard to know how to ask the computer how to use the tools. Is the flag you need in `cmd -h` (traditional) or `cmd -help` (X11) or `cmd --help` (GNU) or `cmd --usage` (other GNU) or `man cmd` (UNIX; `man` is short for "manual") or `info cmd` (GNU)?
mstade said that "On any reasonable unix" the solution is `man cmd`. That's in general true, but apparently GNU/Linux isn't a reasonable unix then[1] (one may even say that it's not Unix :P ). Often (mostly for GNU commands), the man page is crappy (don't ever bother with the wget man page, `wget --help` is what you want) or non-existent. But it's a good place to start, then you can try working through the options I listed above... after some point you'll gain some intuition for which are the more likely ones to yield results based on who the publisher of the software is.
untothebreach's suggestion to bookmark the man pages for a system that has consistently good man pages, even if they aren't 100% compatible with the version of the command you have. He recommended OpenBSD, which is a good choice. When I was new, I leaned pretty heavily on the FreeBSD man pages https://www.freebsd.org/cgi/man.cgi https://www.freebsd.org/cgi/man.cgi .
[1]: Plug: I actually wrote a blog post once on why documentation on GNU/Linux sucks. https://lukeshu.com/blog/poor-system-documentation.html https://lukeshu.com/blog/poor-system-documentation.html
- dmckeon 11y agoTo make `info cmd` more like `man cmd` do: info --subnodes "$@" | less
- luckydude 11y agoThank you for this one, that's new to me.
- anthk 11y agoGNU Linux main help system is "info". And it sucks. At least its interface. "pinfo" is much, MUCH better. And it has "hjkl".
- LukeShu 11y agoDrop "Linux" from that sentence. Texinfo is /the/ GNU documentation system. The `info(1)` command does have a terrible interface; it's a minimal clone in C of Emacs' `info-mode`. Which is a terrible place to be--non-Emacs users hate it, while Emacs users just use `info-mode`, which is head and shoulders above `info(1)`. Fortunately, texinfo also generates HTML, PDF, and a dozen other formats, such that it's available in an acceptable format for just about everyone. But, no-one's aware of that because all of the `--help` messages just say "type `info cmd` for the full manual."
- agumonkey 11y agoI was saddened by the lack of consistency under linux. I hoped that projects like http://docopt.org/ http://docopt.org/ would help reduce work for developpers and users in one go.