Files and shell

Find what's filling up your disk

See how full the disk is, which folders are biggest and which single files are huge.

  1. How full is the disk
    Terminal
    df -h /
  2. The biggest folders in your home folder
    Terminal
    du -sh ~/* ~/.[!.]* 2>/dev/null | sort -hr | head -20
  3. Single files over 500 MB
    Terminal
    find ~ -type f -size +500M 2>/dev/null
  1. How full is the disk
    Terminal · Ubuntu / Debian
    df -h /
  2. The biggest folders in your home folder
    Terminal · Ubuntu / Debian
    du -h --max-depth=1 ~ 2>/dev/null | sort -hr | head -20
  3. Single files over 500 MB
    Terminal · Ubuntu / Debian
    find ~ -type f -size +500M 2>/dev/null
  1. How full is the disk
    PowerShell
    Get-PSDrive C
  2. The 20 biggest files in your user folder
    PowerShell
    Get-ChildItem $env:USERPROFILE -Recurse -File -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 20 @{n='GB';e={[math]::Round($_.Length/1GB,2)}}, FullName

    Takes a minute or two on a full drive.