文件查询命令

通过命令查询筛选操作系统前五十大的文件。

服务器系统查大文件

find / -xdev -type f -size +100M -exec du -h {} + 2>/dev/null 
| sort -hr 
| head -50

微软系统查大文件

powershell -NoProfile -Command "Get-ChildItem C:\ -File -Recurse -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 50 @{Name='SizeGB';Expression={[math]::Round($_.Length/1GB,2)}},FullName | Format-Table -AutoSize"