2015-08-08 39 views
1

我开始浏览Zed Shaw的命令行速成课程,我正在更改目录课程。当我在cd../../ pwd输入一个错误出现:更改Powershell的目录错误

the term cd is not recognized as the name of a cmdlet, function, script file or operable program

我不知道这意味着什么,并在这方面。我知道我输入了一些它不能识别的东西,但看起来这是它应该识别的东西。我目前的理论是,它正在读入一个空白空间,但这不是错误信息读取的内容。所以我有点失落。

谢谢。

+1

旁注:要知道,“命令行速成班”利用在powershell中有很多* aliases *以减轻cmd /终端的体验。 'cd'和'pwd'不是PowerShell中的实际命令,而是'Set-Location'和'Get-Location' cmdlet的别名。你可以输入'Get-Alias'并按回车键来检索​​所有别名(输出结果也会显示它们的定义) –

+0

谢谢!我会尝试一下。 – AAlex

回答

1

你错过了cd../../之间的空间吗?

而且pwd是一个单独的命令,并应单独进入运行cd

cd ../../  # this changes the current working directory to its parent's parent (goes up two levels) 
pwd   # this displays the current working directory (the original directory's parent's parent) 

因此,例如后:

C:\users\you\dir1\dir2\dir3> cd ../../ 
C:\users\you\dir1> pwd 
C:\users\you\dir1 
C:\users\you\dir1> 
+0

谢谢!间隔的事情是造成麻烦的原因。下次我得到这样的错误时,我也会检查间距。 – AAlex