mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
cd, chdir, set-location, sl: add PowerShell alias and standardize page (#11209)
This commit is contained in:
parent
5097efb814
commit
08d67b5837
4 changed files with 70 additions and 8 deletions
|
@ -1,20 +1,17 @@
|
|||
# cd
|
||||
|
||||
> Display the current working directory or move to a different directory.
|
||||
> In PowerShell, this command is an alias of `Set-Location`. This documentation is based on the Command Prompt (`cmd`) version of `cd`.
|
||||
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/cd>.
|
||||
|
||||
- View documentation of the equivalent PowerShell command:
|
||||
|
||||
`tldr set-location`
|
||||
|
||||
- Display the path of the current directory:
|
||||
|
||||
`cd`
|
||||
|
||||
- Go to root of current drive:
|
||||
|
||||
`cd \`
|
||||
|
||||
- Go up to the parent of the current directory:
|
||||
|
||||
`cd ..`
|
||||
|
||||
- Go to a specific directory in the same drive:
|
||||
|
||||
`cd {{path\to\directory}}`
|
||||
|
@ -22,3 +19,15 @@
|
|||
- Go to a specific directory in a different [d]rive:
|
||||
|
||||
`cd /d {{C}}:{{path\to\directory}}`
|
||||
|
||||
- Go up to the parent of the current directory:
|
||||
|
||||
`cd ..`
|
||||
|
||||
- Go to the home directory of the current user:
|
||||
|
||||
`cd %userprofile%`
|
||||
|
||||
- Go to root of current drive:
|
||||
|
||||
`cd \`
|
||||
|
|
12
pages/windows/chdir.md
Normal file
12
pages/windows/chdir.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# chdir
|
||||
|
||||
> This command is an alias of `cd` in Command Prompt, and subsequently `Set-Location` in PowerShell.
|
||||
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/chdir>.
|
||||
|
||||
- View documentation for the original Command Prompt command:
|
||||
|
||||
`tldr cd`
|
||||
|
||||
- View documentation for the original PowerShell command:
|
||||
|
||||
`tldr set-location`
|
33
pages/windows/set-location.md
Normal file
33
pages/windows/set-location.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Set-Location
|
||||
|
||||
> Display the current working directory or move to a different directory.
|
||||
> This command can only be used through PowerShell.
|
||||
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/set-location>.
|
||||
|
||||
- Go to the specified directory:
|
||||
|
||||
`Set-Location {{path\to\directory}}`
|
||||
|
||||
- Go to a specific directory in a different drive:
|
||||
|
||||
`Set-Location {{C}}:{{path\to\directory}}`
|
||||
|
||||
- Go and display the location of specified directory:
|
||||
|
||||
`Set-Location {{path\to\directory}} -PassThru`
|
||||
|
||||
- Go up to the parent of the current directory:
|
||||
|
||||
`Set-Location ..`
|
||||
|
||||
- Go to the home directory of the current user:
|
||||
|
||||
`Set-Location ~`
|
||||
|
||||
- Go back/forward to the previously chosen directory:
|
||||
|
||||
`Set-Location {{-|+}}`
|
||||
|
||||
- Go to root of current drive:
|
||||
|
||||
`Set-Location \`
|
8
pages/windows/sl.md
Normal file
8
pages/windows/sl.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# sl
|
||||
|
||||
> In PowerShell, this command is an alias of `Set-Location`.
|
||||
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/set-location>.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr set-location`
|
Loading…
Add table
Reference in a new issue