美文网首页
Why was '~' chosen to represent

Why was '~' chosen to represent

作者: AlphaHinex | 来源:发表于2020-06-06 08:59 被阅读0次

原文地址:Why was '~' chosen to represent the home directory?

Quoting Wikipedia:

On Unix-like operating systems (including BSD, GNU/Linux and Mac OS X), tilde often indicates the current user's home directory: for example, if the current user's home directory is /home/bloggsj, then cd, cd ~, cd /home/bloggsj or cd $HOME are equivalent. This practice derives from the Lear-Siegler ADM-3A terminal in common use during the 1970s, which happened to have the tilde symbol and the word "Home" (for moving the cursor to the upper left) on the same key.

KB_Terminal_ADM3A

You can find photos of the Lear-Siegler ADM-3A keyboard on this site.

Lear Siegler - ADM3A Terminal (ca. 1976) image of an ADM-3A keyboard

This terminal is also the source of the movement commands used in the vi editor: h, j, k, l for left, down, up, right.

相关文章

网友评论

      本文标题:Why was '~' chosen to represent

      本文链接:https://www.haomeiwen.com/subject/hzkzzhtx.html