“目录*759*”不返回名称中包含 759 的文件。这是 Windows 7 的问题吗?
我刚刚打开命令提示符并执行了以下操作:
DIR *759*
令我惊讶的是,它没有返回名称中包含 759 的文件。
结果如下:
56CheckRegister_0710.RTF
c5e64017_2007-09-30.pgp
C5X87050_200601.PRT
c5e64017_2008-09-30.pgp
K6CheckRegister_0110.RTF
K6CheckRegister_0910.RTF
K7CheckRegister_1108.RTF
K7CheckSummary_1299.RTF
这个 DIR 应该工作吗?
我本来可以发誓它以前可以工作,但自从升级到 Windows 7 以来我就没有这样做过。
这是 Windows 7 的问题吗?
已编辑: Dwidle 是正确的。它正在获取 DOS 8.3 名称。使用 DIR /x 返回第一列中的短名称。
561759~1.RTF 56CheckRegister_0710.RTF
C52759~1.PGP c5e64017_2007-09-30.pgp
C54759~1.PRT C5X87050_200601.PRT
C5A759~1.PGP c5e64017_2008-09-30.pgp
c5p75922.prt
c5p75978.prt
K63759~1.RTF K6CheckRegister_0110.RTF
K64759~1.RTF K6CheckRegister_0910.RTF
K75759~1.RTF K7CheckRegister_1108.RTF
K7C759~1.RTF K7CheckSummary_1299.RTF`
561759~1.RTF 56CheckRegister_0710.RTF
I just opened a command prompt and did a:
DIR *759*
To my surprised, it did not return files containing 759 in the name.
Here are the results:
56CheckRegister_0710.RTF
c5e64017_2007-09-30.pgp
C5X87050_200601.PRT
c5e64017_2008-09-30.pgp
K6CheckRegister_0110.RTF
K6CheckRegister_0910.RTF
K7CheckRegister_1108.RTF
K7CheckSummary_1299.RTF
Should this DIR work?
I could have sworn it worked before but I have not done this since upgrading to Windows 7.
Is this a Windows 7 issue?
Edited: Dwidle was correct. It is picking up the DOS 8.3 Name. Using the DIR /x returned the short name in the first column.
561759~1.RTF 56CheckRegister_0710.RTF
C52759~1.PGP c5e64017_2007-09-30.pgp
C54759~1.PRT C5X87050_200601.PRT
C5A759~1.PGP c5e64017_2008-09-30.pgp
c5p75922.prt
c5p75978.prt
K63759~1.RTF K6CheckRegister_0110.RTF
K64759~1.RTF K6CheckRegister_0910.RTF
K75759~1.RTF K7CheckRegister_1108.RTF
K7C759~1.RTF K7CheckSummary_1299.RTF`
561759~1.RTF 56CheckRegister_0710.RTF
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它正在查找短名称,即从长名称生成的旧 dos 8.3 名称。使用 /x 开关也可以查看短名称,我打赌他们会有 759。
这将获得长名称中带有 759 的文件。
It's finding the short name, the old dos 8.3 name that's generated from the long name. use the /x switch to see the short name as well and I bet they will have 759.
This will get files with 759 in the long name.
我也可以这样做
请同时查看其他不太令人愉快的可能解释
“盗版别名”(可以在
HKLM\SOFTWARE\Microsoft\CurrentVersion\App Paths
中
Rootkit(请参阅 sysinternals Rootkit 检测器)
I can do that as well
Please also look at other less pleasant possible explanations
A "pirate alias" (can be defined in
HKLM\SOFTWARE\Microsoft\CurrentVersion\App Paths
A rootkit (see sysinternals rootkit detector)
这就是 Windows NT 按设计工作,并且已经工作了很长时间。这种行为是众所周知的。不涉及 rootkit 或“盗版别名”。
正如我在 SuperUser 上写的,其中 另一个答案谈论更改系统设置以阻止这种情况发生比现在更进一步,这根据命令解释器使用的
DIR
命令而有所不同。 Take Command 中的DIR
命令,例如,默认情况下仅匹配长名称,因此不会不要表现出这种行为。 (短名称和长名称的匹配可以打开以与 CMD 的DIR
命令兼容。)因此,有一些方法可以解决这个问题,不需要FSUTIL
和管理员权限。This is Windows NT working as designed, and as it has worked for a long time. This behaviour is widely known. There are no rootkits or "pirate aliases" involved.
As I wrote over on SuperUser, where another answer talks about changing system settings to stop this from happening further than it already does, this varies according to what command interpreter's
DIR
command one uses. TheDIR
command in Take Command, for example, only matches long names by default and so doesn't exhibit this behaviour. (Matching of short as well as long names can be turned on for compatibility with CMD'sDIR
command.) So there are ways to address this that don't requireFSUTIL
and administrator privileges.