shy*_*.me 11 windows-7 windows-explorer
当我创建新文件夹并将其重命名为nul
它时说The Specified device name is invalid.
然后我搜索这是我们不能让其他的文件夹,并获得名字con
,nul
,prn
?
这些名字代表什么?为什么我们不能用这些名字创建文件夹?
Law*_*ceC 36
这一切都始于旧的PIP
CP/M 命令- 该命令用于复制文件,允许您指定特殊的设备名称而不是文件。
开发 CP/M 的 Gary Kildall 将其文件结构和命令处理器的大部分设计基于 Digital Equipment 的操作系统,例如用于 PDP-11 的 RSTS/E。除了访问软盘上的文件外,CP/M 中的 PIP 命令还可以在以下“特殊文件”之间传输数据:
CON: — console (input and output)
AUX: — an auxiliary device. In CP/M 1 and 2, PIP used PUN: (paper tape punch) and RDR: (paper tape reader) instead of AUX:
LST: — list output device, usually the printer
PRN: — as LST:, but lines were numbered, tabs expanded and form feeds added every 60 lines
NUL: — null device, akin to /dev/null
EOF: — input device that produced end-of-file characters, ASCII 0x1A
INP: — custom input device, by default the same as EOF:
OUT: — custom output device, by default the same as NUL:
Run Code Online (Sandbox Code Playgroud)
然而,这些不是真正的设备文件,因为它们的处理仅限于 PIP。
然后 DOS 在 80 年代初出现,一个 8086 CP/M 克隆旨在在当时的新 IBM PC 上工作。DOS 进一步扩展了这个概念——以上是“特殊文件”,可以在 DOS 命令中预期文件的任何地方指定。因此,内置的 DOScopy
命令可用于通过执行copy myfile.txt prn:
. (CP/M 的更高版本可能已经能够做到这一点,但我对此表示怀疑。)
快进到 Windows 95。它本身是建立在 DOS 之上的,处理这些特殊文件名的代码仍然存在,但显然没有很好地集成到 Windows 95 的 GUI 部分。它导致了一些问题,例如CON\CON 错误-众所周知,这也会导致 IE 出现问题。
可能是因为对更多潜在错误的偏执(即使在基于 NT 的 Windows 版本中都不应该存在),Microsoft 决定将其设置为 Explorer 始终拒绝任何创建该名称文件的尝试。有趣的是,即使在我现在使用的Windows 8系统中,我仍然无法创建一个名为“con”的文件夹。(Windows 10 仍然不允许你这样做)。
归档时间: |
|
查看次数: |
37141 次 |
最近记录: |