mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-03 06:43:17 +00:00
31 lines
722 B
Plaintext
31 lines
722 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, windows]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# Get-ChildItem
|
|
|
|
> List items in a directory.
|
|
> Note: This command can only be used through PowerShell.
|
|
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-childitem>.
|
|
|
|
- List all non-hidden items in the current directory:
|
|
|
|
`Get-ChildItem`
|
|
|
|
- List only directories in the current directory:
|
|
|
|
`Get-ChildItem -Directory`
|
|
|
|
- List only files in the current directory:
|
|
|
|
`Get-ChildItem -File`
|
|
|
|
- List items in the current directory, including hidden items:
|
|
|
|
`Get-ChildItem -Hidden`
|
|
|
|
- List items in a directory other than the current one:
|
|
|
|
`Get-ChildItem -Path {{path o\directory}}`
|