Skip to content

Instantly share code, notes, and snippets.

@tomarbuthnot
Created October 8, 2014 15:48
Show Gist options
  • Save tomarbuthnot/1c148a3ad09641f6313d to your computer and use it in GitHub Desktop.
Save tomarbuthnot/1c148a3ad09641f6313d to your computer and use it in GitHub Desktop.
Sort Files by Size PowerShell
Get-ChildItem -Path c:\ -Recurse | Sort-Object Length -Descending | Select-Object length,name,directory -First 100 | Format-Table -AutoSize
@LethalLuggage
Copy link

If you paste this directly into Powershell it will crash your computer. I'd advise not using C:\ as a base path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment