반응형
-
ls
Get-ChildItem
-
ls (Alias)
ls ls C:\
-
필터
ls -filter *.jpg
-
다중필터 (Where 적용)
ls | Where {$_.extension -in ".mp4", ".avi", ".mkv"}
-
폴더만 표시
ls -directory ls -dir ls -ad
-
파일만 표시
ls -file ls -af
-
숨긴파일만 표시
ls -hidden
-
파일 전체경로 표시
ls | select fullname ls | % {$_.fullname}
-
속성으로 찾기
ls -attribute r ls -attr r ls -attr d+r ls -attr d+!r ls -attr !d
-
mode로 찾기
ls | where {$_.mode -in "d-r---"}
-
파일 개수 확인 (Measure-Object)
ls | Measure-Object
Get-ChildItem (Microsoft.PowerShell.Management)
The Get-ChildItem cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the Recurse parameter to get items in all child containers and use the Depth p
docs.microsoft.com
반응형
'Windows 10 > PowerShell' 카테고리의 다른 글
PowerShell : TrustedInstaller 권한 때문에 삭제 불가능한 파일 삭제하기 (0) | 2019.08.22 |
---|---|
PowerShell : Registry (0) | 2019.08.21 |
PowerShell : Get-Content, Set-Content, Out-File (파일 입출력) (0) | 2019.07.09 |
PowerShell : 기본 명령어 (0) | 2019.06.16 |
PowerShell : Alias (0) | 2019.06.15 |