Find the largest files with PowerShell

Powershell

The Windows counterpart to du | sort | head.

Get-ChildItem -Recurse -File |
  Sort-Object Length -Descending |
  Select-Object -First 20 FullName, @{N='MB';E={[math]::Round($_.Length/1MB,1)}}

More in Shell

Random picks