整个网络 G狂想 G花絮 G创意 G快讯 G技巧 小项目 招聘

 

无能的WinXP?

由. Ken Wong 将文章归档于 G事八卦

发现这个最近在国外的论坛很热门,细看一下,发现真的很有趣。大家也可以试一试:

在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?
Tags: 微软 

Trackback: http://www.creative-weblogging.com/cgi-bin/mt-tb.pl/33116





CW工具栏安设
RSSrss   | 所有的部落格订阅选择
Google google   |   什么是RSS?
Yodao Yodao
Netvibes Netvibes
AnothrAnothr
时事通讯

使用我们的搜索寻找其他有趣的文章



  • 贡献者

 


  • 推荐书

  • GSeeker(G速客;原“幻灭的麦克风”)曾经是一个专注于Google及搜索行业的个人blog。目前的Gseeker将不仅仅是以Google为主,而是以互联网及互联网应用为主的项目博客。
    ——Hong Xiaowan
    GSeeker(G速客;原“幻灭的麦克风”)是一个专注于Google及搜索行业的个人blog。非Google官方网站。我们试图记录真实的Google,包括它的花边新闻。Google不是我们的信仰,只是我们的兴趣。如果您发现与Google或搜索行业有关的有趣的信息,不妨给我们发邮件。感谢您的访问!
    ——Ken Wong(幻灭)


  • Other blogs in the same channel in the Creative Weblogging Network







 

Tagcloud: GAH G狂想 G花絮 G创意 G多点 G快讯 G技巧 G事八卦 G源共享 Sponsored Post 公告 小项目 幻灭日志 挨踢G讯 杂谈