Created
March 25, 2015 09:52
-
-
Save aburok/b0037c5e53b6ad915f10 to your computer and use it in GitHub Desktop.
powershell Get n biggest files from directory ( without directories )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Recures -Include * | |
| Where-Object { -not $_.PSIsContainer } | |
| Sort-Object Length -descending | |
| Select-Object -First 10 | |
| Select Name, Length | |
-- OR -- | |
gci -re -in * | |
| ?{-not $_.PSIsContainer} | |
| sort Length -descending | |
| select -First 10 | |
| select Name, Length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment