例如,为什么 Windows 给我的硬盘字母 C 而不是 A 或 B?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/531576/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is Windows giving my hard disk the letter C and not A or B for example?
提问by ISW
Is it because the operating system is written in the C programming language? I think that the A and B languages were not so successful?
是不是因为操作系统是用C语言编写的?我认为 A 和 B 语言没有那么成功?
I am thirteen and trying to do computer programming in C#.
我 13 岁,正在尝试用 C# 进行计算机编程。
回答by ISW
Wikipediagives a good explanation about the logic of drive lettering:
维基百科对驱动盘符的逻辑给出了很好的解释:
Except for CP/M and early versions of MS-DOS, the operating systems assigns drive letters according to the following algorithm:
除了 CP/M 和早期版本的 MS-DOS,操作系统根据以下算法分配驱动器号:
- Assign the drive letter A: to the first floppy disk drive (drive 0), and B: to the second floppy disk drive (drive 1), if present.
- Assign a drive letter, beginning with C: to the first active primary partition recognised upon the first physical hard disk.
- Assign subsequent drive letters to the first primary partition upon each successive physical hard disk drive, if present within the system.
- Assign subsequent drive letters to every recognised logical partition, beginning with the first hard drive and proceeding through successive physical hard disk drives, if present within the system.
- Assign subsequent drive letters to any RAM Disk.
- Assign subsequent drive letters to any additional floppy or optical disc drives.
- 将驱动器号 A: 分配给第一个软盘驱动器(驱动器 0),并将 B: 分配给第二个软盘驱动器(驱动器 1)(如果存在)。
- 为第一个物理硬盘上识别的第一个活动主分区分配一个以 C: 开头的驱动器号。
- 将后续驱动器号分配给每个连续物理硬盘驱动器上的第一个主分区(如果系统中存在)。
- 将后续驱动器号分配给每个已识别的逻辑分区,从第一个硬盘驱动器开始,然后通过连续的物理硬盘驱动器(如果系统中存在)进行。
- 将后续驱动器号分配给任何 RAM 磁盘。
- 将后续驱动器号分配给任何其他软盘或光盘驱动器。
回答by excalibur
It's a left over from the original PC designs. Originally PCs only had up to 2 floppy disk drives labelled A and B. Some time later hard disks got added and became drive C.
它是原始 PC 设计的遗留物。最初 PC 最多只有 2 个软盘驱动器,分别标记为 A 和 B。一段时间后,添加了硬盘并成为驱动器 C。
回答by David Grant
The hard disk letter is C because historically, drives A and B were for floppy disks. It has nothing to do with the language in which the operating system is written.
硬盘盘符是 C,因为在历史上,驱动器 A 和 B 用于软盘。它与编写操作系统的语言无关。
回答by David Grant
Ah, floppy disks, remember those?
啊,软盘,还记得那些吗?
You could spend a whole afternoon coding your latest killer app, then find that you couldn't save it because it was too big to fit on a 5.25" single density disk.
您可以花一整个下午编写最新的杀手级应用程序,然后发现您无法保存它,因为它太大而无法放入 5.25 英寸的单密度磁盘。
That was when floppies really were floppy. Thin and flimsy, usually in either 5.25" or 8" sizes, though the first internal drives that appeared in PCs were 5.25". As previously mentioned, the early versions of MS Dos used to automatically assign drive A: to the first floppy drive and B: to the second. Hard drives didn't even fit into PCs back then. You could buy a 5mb Winchester Hard Disk that weighed about 30Kg and came in a big external cabinet nearly the size of a modern mini tower pc.
那是软盘真正软盘的时候。薄而脆弱,通常为 5.25" 或 8" 尺寸,尽管 PC 中出现的第一个内置驱动器是 5.25"。如前所述,MS Dos 的早期版本用于自动将驱动器 A: 分配给第一个软盘驱动器和B:到第二点,那时候硬盘连个人电脑都装不下。你可以买一个5MB的温彻斯特硬盘,重约30Kg,装在一个大的外置机柜里,几乎有现代迷你塔式电脑的大小。
If your PC had twin floppies you could type a command something like "copy a: b:" to copy the contents of drive A: to drive B:
如果您的 PC 有双软盘,您可以键入类似“copy a: b:”的命令将驱动器 A: 的内容复制到驱动器 B:
But then that was all back in a time when Bill Gates was worth about $10,000!
但这一切都回到了比尔盖茨身价约 10,000 美元的时代!
回答by VonC
While floppy drives were attached to drive 0 and 1 (A
and B
), nowadays, memory card and SD cards are like any other drive (hard-drives, CD-ROM readers, ...), and simply take any drive letter afterC
.
虽然软盘驱动器连接到驱动器 0 和 1(A
和B
),但现在,存储卡和 SD 卡就像任何其他驱动器(硬盘驱动器、CD-ROM 读取器,...)一样,只需在C
.
A
and B
are kept for backward compatibility reason.
A
并且B
出于向后兼容性原因而保留。
To better illustrate how (finally, Q1 2014) floppy drives are fading away, consider the new Eclipse icons:
为了更好地说明(最终,2014 年第一季度)软盘驱动器是如何消失的,请考虑新的 Eclipse 图标:
Lars Vogeljust referenced this Stack Overflow question in his article "Eclipse org.eclipse.ui
switches to png files and waves good bye to the floppy disk".
Lars Vogel刚刚在他的文章“ Eclipseorg.eclipse.ui
切换到 png 文件并与软盘说再见”中引用了这个 Stack Overflow 问题。
It illustrates that the next Eclipse Luna 4.4 will no longer show floppy disk, but rather icons which look "now a bit like a SD card".
它说明下一个 Eclipse Luna 4.4 将不再显示软盘,而是显示“现在有点像 SD 卡”的图标。
They are designed by https://twitter.com/enleetenfrom http://www.l33tlabs.com/, using png file in order to:
它们由http://www.l33tlabs.com/的https://twitter.com/enleeten设计,使用 png 文件,以便:
support transparency and therefore also look good on a dark theme (background).
支持透明度,因此在深色主题(背景)上也很好看。
I find the difference subtle though:
我发现差异很微妙:
After:
后:
Before (old icons):
之前(旧图标):
This was recorded in bug 422175:
这记录在错误 422175 中:
Someone mentioned on twitter how the traditional save "floppy" idiom is somewhat anachronistic these days. So while working on the eclipse icons, we've created a new version of the save icon.
The new icon keeps the profile of the floppy icon but replaces the diskette sliding door with some electrical contacts, effectively turning the icon into a memory card. This ensures that the icon is recognized by most users as "save" while still being representative of modern storage media.
I've attached an image for comparison.
- The first row is the current icon,
- the second row was a more extreme change (making it look like an SD card) and
- the third row is the icon we're proposing in this bug.
有人在 twitter 上提到,如今传统的保存“软盘”习语有些过时了。因此,在处理 eclipse 图标时,我们创建了新版本的保存图标。
新图标保留了软盘图标的轮廓,但用一些电子触点取代了软盘滑动门,有效地将图标变成了存储卡。这确保该图标被大多数用户识别为“保存”,同时仍然代表现代存储媒体。
我附上了一张图片进行比较。
- 第一行是当前图标,
- 第二行是一个更极端的变化(使它看起来像一张 SD 卡)和
- 第三行是我们在此错误中建议的图标。
回答by Autodidact
Its because A and B used to be floppy drives back in the days when floppy drives were the norm and there were no hard-disks. The letter C was given to any hard disk that the user installed. The drives A and B have since then been reserved for floppy drives. This has nothing to do with programming languages.
这是因为在软驱成为常态且没有硬盘的时代,A 和 B 曾经是软驱。字母 C 被赋予用户安装的任何硬盘。从那时起,驱动器 A 和 B 就被保留用于软盘驱动器。这与编程语言无关。
回答by echo
On computers running Windows or MS-DOS, the hard drive is labelled with the drive letter C, because it is the first available drive letter for hard drives. The computer reserves the A: and B: drive letters for the floppy disk drive and removable media, such as tape drives, even if none of these devices are installed in the computer. As you install other drives and create new partitions, they will be assigned to other drive letters after C, such as D, E, F, G, etc.
在运行 Windows 或 MS-DOS 的计算机上,硬盘标有盘符 C,因为它是硬盘驱动器的第一个可用盘符。计算机为软盘驱动器和可移动媒体(如磁带驱动器)保留 A: 和 B: 驱动器号,即使计算机中没有安装这些设备。当您安装其他驱动器并创建新分区时,它们将被分配到 C 之后的其他驱动器号,例如 D、E、F、G 等。
回答by Stefano Driussi
I think it's a kind of legacy from old versions of Microsoft Operating Systems where letters A and B were assigned to floppy drives.
我认为这是旧版本的 Microsoft 操作系统的一种遗产,其中字母 A 和 B 被分配给软盘驱动器。
回答by Cerebrus
I'd say that it's because the A: and B: drives were traditionally floppy drives and early computers required you to boot using a bootable floppy disk.
我会说这是因为 A: 和 B: 驱动器传统上是软盘驱动器,早期的计算机要求您使用可引导软盘进行引导。
I strongly doubt if the lettering has anything to do with programming languages.
我强烈怀疑字母是否与编程语言有关。
回答by Cerebrus
Think DOS was working from floppy drive, and windows built on DOS continued the same drive letter convention ...
认为 DOS 是从软盘驱动器工作的,而基于 DOS 构建的 Windows 继续使用相同的驱动器号约定......