Answers:
DavidPostill的答案列出了所有attrib
switch 的含义。让我们用它来解释该特定命令:
-h
删除隐藏的属性(这样项目将显示在资源管理器中)-r
删除只读属性-s
删除系统属性(也使项目显示在资源管理器中)/s
使命令以递归方式查看所有子文件夹/d
使它也将属性应用于文件夹(不仅是文件)g:\*.*
是在其中应用更改的路径因此,我得出结论,该命令旨在从G驱动器上的所有内容中取消所有属性(*.*
表示所有带有扩展名的文件;*
是一个匹配一个或多个字符的通配符。这/s
使该命令可以处理您起始目录下所有文件夹中的所有内容,g:\
)
如果您要查找文件,该命令可能会使资源显示在资源管理器中(假设您始终不显示隐藏/系统文件),但是它不会神奇地告诉您所要查找的内容的位置。要查找特定文件,请尝试使用Explorer的搜索功能。
attrib -h -r -s /s /d g:\*.*
运行attrib /?
以获取帮助:
F:\test>attrib /?
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I]
[drive:][path][filename] [/S [/D] [/L]]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
I Not content indexed file attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
笔记:
attrib
命令。