Hacker News new | ask | show | jobs
by epo 4716 days ago
Please don't let HN become a substitute for RTFM. This should be known by all SSH users who have skimmed the man page. Fair enough as a blog post but for this trivia to get 46 points so far is deeply depressing.

Maybe I should write a blog post about the use of CTRL-Z in the shell and post that here, should get me Kilo-karma points if this is anything to go by.

4 comments

When you have a toolset that includes, but is not limited to:

* Ruby

* Rails

* Postgres

* C

* Erlang

* Emacs

* Bash/Zsh/whatever

* Linux Kernel

* GNU C library

* Postfix

and on and on and on, these kinds of tricks are bound to be useful to someone who is not a complete expert with whichever system is being discussed.

Also, realistically speaking, they are far less prevalent than nakedly political articles lately, which do weight on the quality of the site.

This is like not knowing the return or exit function, and is also used for telnet or serial console connections. If knowledge is so shallow on a particular tool, it should not count as being part of the toolset. There's nothing more basic or essential to SSH than connecting and disconnecting. And it's right there on the man page, not exactly a hidden feature. This is more beginner level knowledge, maybe novice if being very very generous, but nowhere near expert level.
Connecting: type ssh and the hostname. Disconnecting: type exit or ctrl-d or whatever on the remote end. That's enough for many people.

For a group of people as large as HN, there are bound to be many people who are experts in one thing, and marginal with others, so articles like this are likely to appeal to them, and be useful.

I would agree if it were for some more obscure yet useful feature, but this is one of the basics, that's clearly documented. This should not be useful for anyone who's ever read the man page, and anyone who's used ssh should have read the man page at least once. That so many people apparently haven't, in what's supposed to be highly technical community, is a very disappointing sign of intellectual indolence.
On my system, I ran this:

    nice man -l -Tdvi man*/* | wc 
And got

3416771 6700199 122007116

At more than 6 million words, that's approximately 10 War and Peace's. And of course in terms of documentation, that's only man pages, which doesn't cover all the stuff that's in other formats like info or html.

You cannot be an expert in everything: I knew about that command for closing ssh, but frankly it is not something I use because it's easier to just close the rxvt and be done with it. I have zillions of other things to occupy my brain.

I'd also argue that in terms of ssh, since this function is so easily accomplished in other ways, this is really just handy triva. Much more useful to know about are all the tunneling things, as they are not necessarily obvious, and can be extremely useful.

I'm hardly advocating reading every single man page; just the man pages for things you actually use. And 10x War and Peace's is hardly an extreme amount of reading to become a knowledgeable systems administrator. That would probably be akin to two semesters of 5 courses each to become a systems administrator; I think most community college or vocational school programs for systems administration require 2 years, and wouldn't teach you nearly as much.

In any event, I'm not taking the position that casual *nix users should be reading every single man page. Just for the essentials like ssh, cp/mv, ls, man itself, etc. You do not need to be an expert to read a few man pages on utilities you often use. Everyone should RTFM, at least for the relevant bits, no matter what level you're at. Anyone who found the initial post useful would also find reading the man page for ssh useful. Thus, they should have read it. That's not at all suggesting that they need to become an expert.

The ~. key sequence is used in pretty much any console type application, not just ssh, so it's quite useful to know. If you do any work with a serial console i.e. configuring network devices, pdus, even some servers, etc., then it's pretty useful for ending a session as there's no TCP connection to close and take you back to the local console on your terminal emulator. If you're working on the actual local console and not in a full blown GUI on a system without virtual consoles, there may be no other way to close the serial console session on some platforms (notably man different OS'es running on Sparc64's as well as not on Solaris at all until recently).

Regardless, it's generally less effort to type ~. than to close and reopen a window/tab in your terminal emulator of choice. The time spent to read the man page would inevitably be made up by a few clicks saved here and there throughout a long career. It would have taken less time than to make multiple posts in this thread.

I've been using SSH for fifteen years. I have never read the man page because I have never needed to--I have scanned it for specific topics but I have never been quite so teeth-pullingly. This is new and useful information to me and so I upvoted it. On the other hand, I am certain that many, many things I consider trivial would be out of your realm of knowledge and relative understanding of what is and is not trivial should lead you to act better than you are acting.

Or, put another way: don't be an asshole.

At the end of the day, RTFM is much more helpful than spoon feeding someone an answer. Maybe it comes off as being an asshole, but a little shame can be a good motivator for a neophyte to learn how to teach themselves, and they will be better off for it in the long run. "Teach a man to fish" and all that.
Do you want a shovel for that giant hole you're digging?

"A little shame is a good thing" says to everybody around you that you're more interested in feeling good about yourself than helping people. And it's a joke to boot. I've been doing this for around fifteen years, I've written multiple telnet server applications and a MUD client, and I didn't know about this feature in telnet/rlogin/ssh.

Or maybe because I was once a neophyte that was shamed into RTFM, which had a very positive effect on my life, I'm advocating other people RTFM also? Which would hopefully help them as much as it did me? This is generally how things work for online communities, be it an IRC channel, a mailing list, or web forums. Why shouldn't it be that way on HN, especially as RTFM is as much part of hacker culture as anything.

Meanwhile, you're resorting to making baseless assumptions about a total stranger on the Internet, and bringing your own credentials into this rather than focusing on the argument at hand. Who's digging the giant hole? Who's more interested in feeling good about himself?

I really couldn't care less what your personal story is, or what you've imagined up about mine. Let's stick to why someone should or should not RTFM, okay?

Not everyone on HN is a terminal expert, and not sure why you would assume such. It got a lot of points because people found this interesting and helpful. Also, you should write a blog post about CTRL-Z, if people find the info valuable, it'll get the upvotes.
It should also be known by anyone who has used Telnet, since that's where it originated. (For more shortcuts, use '~?' from the ssh session)
Not any telnet I've ever used. Telnet is ^] to get to the command prompt and then "quit". It even says so right when you connect:

    $ telnet google.com 80
    Trying 74.125.239.103...
    Connected to google.com.
    Escape character is '^]'.
Apparently it's rsh, not telnet. The telnet manual does mention it though, since you can put telnet in a rsh-like mode where ~ does work. (May depend on telnet version.)
Ah, my bad! Guess i'm older than I thought...
man 1 telnet on FreeBSD or OpenBSD contains: "When in rlogin mode, a line of the form ~. disconnects from the remote host; ~ is the telnet escape character. Similarly, the line ~^Z suspends the telnet session. The line ~^] escapes to the normal telnet escape prompt."

although on the Debian man page, it appears slightly differently as: "-r Emulate rlogin(1). In this mode, the default escape character is a tilde. Also, the interpretation of the escape character is changed: an escape character followed by a dot causes telnet to disconnect from the remote host. A ^Z instead of a dot suspends telnet, and a ^] (the default telnet escape character) generates a normal telnet prompt. These codes are accepted only at the beginning of a line. "

telnet is not installed by default on CentOS, but has the same man page as on Debian.

Do so if you wish to. Interested to know what you intend to do with that kilo, or how someone else earning a few hurts your cause.
If it becomes acceptable to use HN for gamified man pages instead of expecting people to do their homework, well, there are more than enough man pages in and out of print to fill HN for years. We don't have downvotes on stories, so the only flow control is flagging and complaining about stuff that isn't timely and isn't useful for most of the audience.
That is ridiculous strawman argument. How would such stories end up in a prominent position on HN unless enough people from the community likes it.

In any case that was not what my comment was about. I was, and still am, more than surprised by the poster's puerile lament that someone is getting a few odd karma that the poster thought was undeserved. I assumed that this place is somewhat removed from such "Mama ! he took my toy" behavior.