Windows的DOS外壳有些奇怪 [英] something strange about windows's DOS shell

查看:103
本文介绍了Windows的DOS外壳有些奇怪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows XP的DOS shell中编写了以下命令,并发生了一些奇怪的事情:

I wrote following command in windows XP''s DOS shell and something strange happened:

C:\Foleder1\copy sample.txt :


由于输入错误,我写了:"而不是"D:",但是它将sample.txt复制到了我找不到的地方!

我在整个硬盘上搜索了sample.txt,但该文件的唯一实例是 C:\ Folder1
中的原始文件. 您知道Win-XP DOS shell中:"路径的实际位置吗?

您可能会说:"是当前路径,并且文件本身已被覆盖,但是请查看此内容,如果您是第一次运行该命令,则结果如下:
已复制


because of my typing mistake, I wrote ":" instead of "D:", but it copied the sample.txt to somewhere I cant find!

I searched my whole HDD for sample.txt but the only instance of this file is the original one which is in C:\Folder1
Do you know where ":" path actually is in Win-XP DOS shell?

you may tell ":" is current path and the file have overwritten on itself but look at this, if you run that command for the first time, this will be the result:

1 file copied.


下次运行该命令时,它将询问您:


next time you run that command it will ask you:

overwrite sample.txt? (yes/no/all)


因此,如果要自行写入文件,则两个结果必须相同,但不相同.

在此先感谢您的帮助


so if its going to write the file on itself, both result have to be the same but its not.

thanks in advance for your help

推荐答案

是的,它很聪明!

您已经找到了用于创建NTFS alternate data stream的语法,并且我认为您将创建一个名为:sample.txt的备用流,该流是原始文件的完整副本,但从常规视图中隐藏.

http://en.wikipedia.org/wiki/Fork_(file_system)中提供了一些背景知识. [ ^ ],尤其是在文章.

由于XP不包含用于查看或删除这些内容的任何内容,因此我建议您下载一个工具,例如 AlternateStreamView [ ^ ],这将使您看到自己所做的事情.

出乎意料的是,记事本将允许您查看文本格式alternate data stream.尝试在命令窗口中键入Notepad :Sample.txt以查看会发生什么.

艾伦.
Yes it''s quite clever!

You''ve hit upon a syntax for creating an NTFS alternate data stream and I think you will have created an alternate stream named :sample.txt which is a complete copy of the original file but hidden from normal view.

A bit of background is available in http://en.wikipedia.org/wiki/Fork_(file_system)[^] especially in the links at the end of the article.

As XP doesn''t contain anything for viewing or deleting these I recommend you download a tool such as AlternateStreamView[^] which will let you see what you''ve done.

Suprisingly Notepad will let you view a text format alternate data stream. Try typing Notepad :Sample.txt in a command window to see what happens.

Alan.


这篇关于Windows的DOS外壳有些奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆