gseeker
无能的WinXP?
将文章归档于 G事八卦 由. Ken Wong on 2005-10-20
发现这个最近在国外的论坛很热门,细看一下,发现真的很有趣。大家也可以试一试:

在WinXP系统里,新建一个或夹,然后将它命名为con试试。

你成功了吗?

当然是失败,不能成功的。

这真是个很有趣的现像。大名鼎鼎的微软出品的WinXP,竟然连新建个指定的夹也不行?这也太"无能"了吧?

原因是什么?看下面分解。

It's not that weird. 'con' is a reserved word from the old DOS days, simply meaning 'console'. If you wanted to create a new text file in DOS you could type 'copy con newfile.txt' meaning copy from the console to newfile.txt. This would let you type some lines and when you ended the file with ^Z (DOSish for 'end of file') you would have a file called newfile.txt containing whatever you wrote in the console. This is indeed still possible in the Windows XP console, and can you see what mess it would cause if you let files or folders have the name 'con'? What would 'copy con newfile.txt' then mean? BSOD?

其实这并不能怪WinXP。因为"con"在DOS时代就是一个预定字,它实际上就是指"console"。如果你想在DOS下新建一个文本,你可以使用以下命令:

copy con newfile.txt

用这个命令可以将你在console控制台下所打的内容通通保存到一个newfile.txt文本里。就算是在WinXP的CMD里,这个命令依然有效。所以试想一下,如果你可以将或夹命名为con,那当你使用

copy con newfile.txt

命令的时候,会发生什么事?死机?或者更严重的后果。

类似地,在WinXP系统下,你不能将或命名为以下名字:

CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.


2006年4月1日补充YeSun发现了在WinXP的Dos Shell下面实现创建CON夹的方法:

在运行里输入CMD后回车进入Dos Shell;

然后转至D:盘,输入下面的命令回车:

md coo\

这样就在D:盘里建立了一个名字为CON的夹。删除这个夹,同样是在Dos Shell下输入命令:

rd \\?\d:\con /s /q

即可。


Permalink: 无能的WinXP?
img Addthis img Ask img Blinklist img del.icio.us img Digg img Fark img Facebook img Google img Lycos img Ma.gnolia Add this page to Mister Wong Mr Wong img Netscape img Netvousz img Newsvine img Reddit img StumbleUpon img Slashdot img Tailrank img Technorati img Wink img Yahoo

Vote for 无能的WinXP?:

  • Currently 8.25/10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
分值情况: 8.25 / 4 评分
 
Share It
CW工具栏安设
RSSrss   | 所有的部落格订阅选择
Google google   |   什么是RSS?
Yodao Yodao
Netvibes Netvibes
AnothrAnothr
TwitterFollow us on Twitter!