powershell - 回到目录

标签 powershell

我当前的目录是

C:/users/admin/temp

接下来,我导航到
C:/users/admin/temp/1/2

我如何回到 temp不使用 pushd在临时命令,然后转到 temp只需一个命令,无需回家或做 cd ~ ?

最佳答案

使用 Push-LocationPop-Location而不是 cd (又名, Set-Location )。

或者,如果只想向上遍历目录层次结构两级,可以使用 cd ..\.. .

关于powershell - 回到目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29170594/

相关文章:

powershell - 路径中使用的 % 功能如何

Powershell .ini 文件处理 : retrieve values with numeric keys

com - 如何在 COM 对象上查询 Powershell 接口(interface)

powershell - 我可以在 Powershell 中命名什么函数?

azure - 要导入以运行此 Powershell 命令的模块的名称

powershell - Hyper-V 使用 PowerShell 实时备份 VHD

c# - 找不到添加类型错误元文件

PowerShell:If 语句并在 Import-CSV 中使用空白单元格

asp.net - 使用 Powershell 从 Servicenow 票证下载附加的 excel 文件

mysql - 在 INSERT 语句后无法返回最后一个已知的 ID