3 ms·
This is how every man page starts, with a "SYNOPSIS" of invocation. For example the ssh man page starts: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface
by gumby 8y ago
This is how every man page starts, with a "SYNOPSIS" of invocation. For example the ssh man page starts:
ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address] [-c cipher_spec] ...
If there are several incompatible ways to invoke an operation several cases are given, e.g.
netstat [-AaLlnW] [-f address_family | -p protocol]
netstat [-gilns] [-v] [-f address_family] [-I interface]
...
Typically there are examples in the EXAMPLES or USAGE section which you can jump straight to via /^U or /^E
In the case of ssh there are several such sections so just jump to them via /^[^ ]
- crispyambulance 8y ago> ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address] [-c cipher_spec] ... That's exactly the kind of "SYNOPSIS" would make me want to stomp on puppies when looking at a man page because I forgot some basic usage. But actually, thanks for the key-combo tip on jumping straight to examples.
- knolan 8y agoI find many manpages to be pretty obtuse. They could do a lot to help those of us who need a bit more hand holding. I like cheat.sh. You can curl it directly from your terminal and it offers the quick examples I often need to get back to work. Here is their ssh page: http://cheat.sh/ssh http://cheat.sh/ssh Also I am a huge fan of Matlab’s Documentation, at least up to the more recent versions that became less usable. They give a clear description of the function, list syntax options, give several examples and provide a see also section with similar or related functions (greatly helping discoverability). They usually include academic references at the end. https://uk.mathworks.com/help/matlab/ref/atand.html?s_tid=doc_ta https://uk.mathworks.com/help/matlab/ref/atand.html?s_tid=do...
- gumby 8y agoWhereas it works great for me so that when I can’t remember the precise syntax I can just glance at the top of the man page; if I want anspecific option I can search for it. Info format files are intended to be more comprehensive and tutorial but they never really made the jump to Unix.
- beefield 8y agoSorry, in my Ubuntu 18.04 "man ssh" produces output that does not have either EXAMPLES or USAGE. /^E takes me to ENVIRONMENT instrad of EXAMPLES.
- gumby 8y agoYes but as I mentioned in my comment for ssh there are several sections that each explain a different use case which you can jump to via /^[^ ]
- beefield 8y agoSorry, I am confused. In your comment you said that in case of ssh there are several EXAMPLES or USAGES sections. Well, in my case I find exactly zero instances regardless what kind of key combo from your comment I use. If you instead meant that e.g. TCP FORWARDING or X11 FORWARDING are such sections that explain use cases, well, in that case I still fail to find a section that would describe simple use case of just connecting to a host.