4 ms·
> -h Help. This is actually less common than one might expect offhand — for much of Unix's early history developers tended to think of on-line help as memory-fo
by pwaivers 8y ago
> -h Help. This is actually less common than one might expect offhand — for much of Unix's early history developers tended to think of on-line help as memory-footprint overhead they couldn't afford.
This one does surprise me. It is almost always one of the first options I try. That or "--help".
- smhenderson 8y agoI find in most modern tools whether or not -h or --help is implemented using them often yields at least a usage statement. I'm sure it's just default "I don't recognize the option so here's how to use this tool" message but the result is the same. There are exceptions of course, e.g. mysql uses -h for host so you just get an error message about requiring an argument. --help is implemented properly in this case though.
- mort96 8y agoI usually use `-h`, because it's shorter to type than `--help`. I find I encounter this kind of message way too frequently: wc: invalid option -- 'h' Try 'wc --help' for more information.
- smhenderson 8y agoThat is annoying, I actually prefer the behavior I described. If an argument is not recognized I just want a usage message so I can check my syntax quickly.
- cyphar 8y agoA friend of mine once had telnet'd into their (awful) ISP home router, and started playing with the various commands. Not thinking, they typed "init -h" and the router then promptly stopped routing packets. Turns out the (probably custom-written) "init" automatically sets the runlevel to single-user mode, and they handn't bothered to implement "-h". For this reason, I always use "man <command>". The prevalence of "--help" has always bothered me since a badly-written command could start doing all sorts of unexpected things, when you just wanted to see the documentation. I've seen all sorts of ISV software not implement --help correctly. "man" always works.
- jancsika 8y agoOoh, good catch. "man oven" = look up your oven model in your Home Manual "oven -h" = turn your oven dial past "Broil" and hope it pops out a hidden cheat sheet