macos bin文件夹_为什么〜代表macOS和Linux上的主文件夹?

macos bin文件夹

macos bin文件夹

Whether you’ve installed the Linux subsystem on Windows 10 or are getting started using the Linux Terminal, there are all kinds of shorthands you need to learn…none of which are intuitive.

无论您是在Windows 10上安装Linux子系统,还是要开始使用Linux Terminal ,都需要学习各种速记,但都不是直观的。

For example there’s the tilde, ~, which represents your home folder. Typing cd ~/Documents switches to the Documents folder in the current user’s home directory, saving me from having to type /Users/justinpot/Documents every time. It’s a convenient shortcut, sure, but why is that particular character used for this?

例如,代字号~代表您的主文件夹。 键入cd ~/Documents切换到当前用户主目录中的Documents文件夹,使我不必每次都键入/Users/justinpot/Documents 。 当然,这是一个方便的快捷方式,但是为什么要使用该特定字符呢?

Believe it or not, it’s because of a keyboard from the 1970s. Here’s a Lear Siegler ADM-3A terminal, first shipped in 1975.

信不信由你,这是由于1970年代的键盘。 这是里尔·西格勒(Lear Siegler)ADM-3A终端机,于1975年首次发货。

This was a “dumb terminal,” meaning it wasn’t a computer in itself, but instead allowed you to input commands to and display data from a computer. The ADM-3A cost only $995, which believe it or not was a good price at the time, meaning institutions could purchase several such terminals to connect to one central computer. To this day, modern “terminal emulators,” such as those used in Linux and macOS, mimic functionality from such systems.

这是一个“哑终端”,意味着它本身不是计算机,而是允许您向计算机输入命令并显示数据。 ADM-3A的价格仅为995美元,这在当时还是不算价格,这意味着机构可以购买多个这样的终端来连接到一台中央计算机。 迄今为止,现代的“终端仿真器”(例如Linux和macOS中使用的仿真器)都模仿了此类系统的功能。

It’s a hugely influential piece of hardware; a lot of early software development happened on it, meaning the keyboard layout influenced a few design choices. Check it out:

这是一个非常有影响力的硬件。 许多早期的软件开发都在上面进行,这意味着键盘布局影响了一些设计选择。 看看这个:

Notice anything? Here’s a clearer image.

注意到什么了吗? 这是一个更清晰的图像。

See the key at top-right? That’s the HOME key, which acts similarly to the Home key on modern keyboards, bringing the cursor to the top-left position while editing text. It’s also the key used for the tilde symbol: ~. That association was enough for ~ to eventually represent home folders.

看到右上角的钥匙吗? 这就是HOME键,其作用类似于现代键盘上的Home键,在编辑文本时将光标移至左上角。 这也是波浪号( ~所使用的键。 这种关联足以使~最终代表主文件夹。

That’s right: a specific keyboard from over forty years ago is why Linux and UNIX-based systems use ~ to represent home, even though the ~ and Home keys couldn’t be further apart on most modern keyboards. Weird, right?

没错:四十多年前的特定键盘是为什么基于Linux和UNIX的系统使用~表示home,尽管~和Home键在大多数现代键盘上无法分开。 奇怪吧?

And there are other details hidden in this keyboard. See the arrows on the H, J, K, and L keys? Holding Control and pressing those keys is how you moved the cursor in Terminal, which is why those same keys are used to move the cursor in vi. Those vi keyboard shortcuts, in turn, inspired the keyboard shortcuts in Gmail, Twitter and even Facebook. That’s right: even Facebook’s keyboard shortcuts were inspired by a “dumb terminal” first sold in 1975.

并且此键盘中隐藏了其他详细信息。 看到H,J,K和L键上的箭头了吗? 按住Control键并按这些键是在Terminal中移动光标的方式,这就是为什么使用这些相同的键在vi中移动光标的原因 。 这些vi键盘快捷键又启发了GmailTwitter甚至Facebook键盘快捷键 。 没错:即使是Facebook的键盘快捷键也受到1975年首次销售的“哑终端”的启发。

Look some more and you’ll notice see a few keys you don’t recognize at all. There’s the “Here Is” key, which blogger Dave Cheney explains here. Basically, it confirmed who you are over the network. You’ll also see that the Escape key is places where Caps Lock is on modern keyboards, which kind of puts the MacBook touch bar Escape key controversy in a new light. I’m sure there’s many other details I’m missing.

多看一些,您会发现看到一些根本无法识别的键。 有一个“ Here Is”键,博主Dave Cheney在此进行了解释 。 基本上,它可以确认您是谁在网络上。 您还会看到Escape键是Caps Lock在现代键盘上的放置位置,这使MacBook触控条Escape键的争议焕然一新。 我确定我还有很多其他细节。

A device you’ve never heard of influenced design decisions used in software people still use over forty years later. Isn’t history weird?

您从未听说过会影响软件设计决策的设备,人们在四十年后仍在使用。 历史不是很奇怪吗?

Image Credits: Chris Jacobs, StuartBrady, Eric Fischer

图片来源: Chris JacobsStuartBradyEric Fischer

翻译自: https://www.howtogeek.com/329573/why-does-represent-the-home-folder-on-macos-and-linux/

macos bin文件夹

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值