我刚刚安装了 Windows 7 专业版,我正在根据自己的喜好对其进行配置。我去设置一个符号链接(因为它支持符号链接)。
但是我好像没有这个mklink
程序C:\Windows\system32
。
在 Powershell 的管理员模式下:
PS C:\> mklink
The term 'mklink' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spel
ling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:7
+ mklink <<<<
+ CategoryInfo : ObjectNotFound: (mklink:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
use*_*686 61
mklink
不是一个独立的工具——它是 Cmd.exe 解释器中的一个内置命令。在外部运行它的唯一方法是通过cmd /c
(类似于sh -c
在 Linux 上):
cmd /c mklink参数
但是,PowerShell 本身支持使用cmdlet创建各种链接类型New-Item
,尽管它不是一个完整的替代品(因为它不支持创建相对符号链接)。
New-Item -ItemType SymbolicLink|Junction|HardLink -Name Foo -Target Bar
归档时间: |
|
查看次数: |
25662 次 |
最近记录: |