Large Files
Find the largest files on your PC — forgotten downloads, old backups, duplicate videos.
- Platforms
- Windows, Linux, macOS
- Needs
- Nothing to install. PowerShell is built into Windows; the bash version uses the standard find command.
- Files
- Find-LargeFiles.ps1 (PowerShell) · large-files.sh (bash)
- Licence
- MIT — read, modify, redistribute
- Verified
- Ran on our test machine on 2026-10-17
- Last reviewed
- 2026-10-17
The problem it solves
When a disk fills up, a handful of files are usually responsible. Large Files finds those offenders directly, instead of making you hunt through folders.
Example output
Here is what the script printed when we ran it on a test computer:
Scanning: C:\Users\you\Documents\Pctools
Threshold: 100KB per file
(read-only: large folders take a while)
Largest files (showing 5):
7.3 MB C:\Users\you\Documents\Pctools\vendor\rampstack-skills\.git\objects\pack\pack-8514f6036a216d2b3f929c526b0aa1e024dc77a3.pack
3.1 MB C:\Users\you\Documents\Pctools\.opencode\node_modules\effect\dist\unstable\httpapi\internal\httpApiScalar.js
3.1 MB C:\Users\you\Documents\Pctools\.opencode\node_modules\effect\src\unstable\httpapi\internal\httpApiScalar.ts
2.5 MB C:\Users\you\Documents\Pctools\vendor\claude-seo\.git\objects\pack\pack-71444a146c0490b26cf6ddd332ae4f3d25cd079e.pack
1.9 MB C:\Users\you\Documents\Pctools\.opencode\node_modules\effect\dist\unstable\httpapi\internal\httpApiSwagger.js
Nothing was deleted or moved. Review each path before you remove anything yourself.Usage
Download the file, then run it from a terminal. On Windows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -File .\Find-LargeFiles.ps1 -Path $HOME -MinSize 500MB -Top 20On Linux or macOS (bash):
bash large-files.sh ~ 500M 20Options
-Path <folder>- folder to scan (default: your home folder)
-MinSize <size>- threshold such as 100MB or 2GB (default 100MB)
-Top <n>- how many files to print (default 20)
What it does
- Lists individual files above a size threshold, largest first
- Understands size suffixes: KB, MB, GB, TB
- Full path per file so you can inspect or delete it deliberately
- Skips symbolic links
Limitations
Know these before you rely on it:
- It walks the tree file-by-file, so on a full multi-terabyte drive this can take several minutes - WizTree-style MFT readers are faster on Windows
- Unreadable directories are skipped silently
- It finds files, it does not tell you which application owns them
- It never deletes anything, by design
Security notes — is this safe to run?
- Read-only: no file is touched, moved or removed
- Safe to run anywhere you are allowed to read; no elevation needed
- Seeing a full path list is useful when posting a support request - redact your username first
Compare the checksum of the file you downloaded against this value to be sure it was not tampered with en route:
| File | SHA-256 |
|---|---|
Find-LargeFiles.ps1 | b9bbee6226056ae33343658ffcea29531a924795cfdcc32009ba1085a767247e |
large-files.sh | 2dc38a60f9ceae4a2c0a231e1846416818957af5dc462f5bfe2f2d0e7661d25c |
Verify with Get-FileHash .\Find-LargeFiles.ps1 -Algorithm SHA256 on Windows, sha256sum Find-LargeFiles.ps1 on Linux or macOS.
Alternatives
- WizTree — Windows, MFT-fast, shows largest files instantly
- TreeSize Free — Windows GUI, straightforward folder drill-down
- Everything + size search — Voidtools search with size: filters on Windows
- baobab — GNOME Disk Usage Analyzer also drills into files
Other tools on this site
- System Report — Check your PC specs: CPU, RAM, disk space and network — one free script, no install.
- Disk Usage — C drive full? Find which folder is using the most disk space on Windows, Mac or Linux.
- Open Ports — Check open ports on your PC — see what is listening and spot anything unexpected.
In context
This tool is one of the steps in the c drive full? free up disk space on windows 10/11 workflow — the guide explains what order to run things in and how to interpret the results.
Source
The complete PowerShell source, so you can audit it before running:
<#
.SYNOPSIS
Find-LargeFiles - lists the biggest files above a size threshold.
.DESCRIPTION
READ-ONLY. Walks a path and prints individual files above a size floor,
largest first. Never deletes or moves anything. Unreadable folders are
skipped silently.
.EXAMPLE
powershell -ExecutionPolicy Bypass -File .\Find-LargeFiles.ps1 -Path $HOME -MinSize 500MB -Top 20
#>
[CmdletBinding()]
param(
[string]$Path = $HOME,
[string]$MinSize = '100MB',
[int]$Top = 20
)
function Convert-Size([string]$s) {
$m = [regex]::Match($s.Trim(), '^(?<n>\d+(?:\.\d+)?)\s*(?<u>B|KB|MB|GB|TB)?$', 'IgnoreCase')
if (-not $m.Success) { return 100MB }
$n = [double]$m.Groups['n'].Value
switch ($m.Groups['u'].Value.ToUpper()) {
'TB' { return [double]($n * 1TB) }
'GB' { return [double]($n * 1GB) }
'MB' { return [double]($n * 1MB) }
'KB' { return [double]($n * 1KB) }
default { return [double]$n }
}
}
if (-not (Test-Path -LiteralPath $Path)) {
Write-Error "Path not found: $Path"
exit 1
}
$floor = Convert-Size $MinSize
Write-Host "Scanning: $Path"
Write-Host ("Threshold: {0} per file" -f $MinSize)
Write-Host '(read-only: large folders take a while)'
Write-Host ''
$found = Get-ChildItem -LiteralPath $Path -Recurse -File -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Length -ge $floor -and -not $_.LinkType } |
Sort-Object Length -Descending |
Select-Object -First $Top
if (-not $found) {
Write-Host '(nothing above the threshold)'
} else {
Write-Host ('Largest files (showing {0}):' -f $found.Count)
foreach ($f in $found) {
$size = if ($f.Length -ge 1GB) { '{0,8:N2} GB' -f ($f.Length/1GB) }
elseif ($f.Length -ge 1MB) { '{0,8:N1} MB' -f ($f.Length/1MB) }
else { '{0,8:N0} KB' -f ($f.Length/1KB) }
Write-Host ('{0} {1}' -f $size, $f.FullName)
}
}
Write-Host ''
Write-Host 'Nothing was deleted or moved. Review each path before you remove anything yourself.'The bash version:
#!/usr/bin/env bash
# large-files.sh - lists the biggest files above a size threshold.
# READ-ONLY: finds and prints, deletes nothing.
# Run: bash large-files.sh [path] [min] [top]
# min accepts forms like 100M, 1G (find -size syntax, default 100M)
set -u
PATH_TO_SCAN="${1:-$HOME}"
MIN="${2:-100M}"
TOP="${3:-20}"
# GNU find wants lowercase k (uppercase K is invalid); normalize it.
case "$MIN" in
*K) MIN="${MIN%K}k" ;;
esac
if [ ! -d "$PATH_TO_SCAN" ]; then
echo "Path not found: $PATH_TO_SCAN" >&2
exit 1
fi
echo "Scanning: $PATH_TO_SCAN"
echo "Threshold: $MIN per file"
echo "(read-only: large folders take a while)"
echo ""
found=$(find "$PATH_TO_SCAN" -type f -size "+$MIN" 2>/dev/null | head -n "$TOP")
if [ -z "$found" ]; then
echo "(nothing above the threshold)"
else
n=$(echo "$found" | wc -l | tr -d ' ')
echo "Largest files (showing $n):"
echo "$found" | while IFS= read -r f; do
bytes=$(wc -c < "$f" 2>/dev/null || echo 0)
size=$(awk -v b="$bytes" 'BEGIN {if (b>=1073741824) printf "%8.2f GB", b/1073741824; else if (b>=1048576) printf "%8.1f MB", b/1048576; else printf "%8.0f KB", b/1024}')
printf '%s %s\n' "$size" "$f"
done
fi
echo ""
echo "Nothing was deleted or moved. Review each path before you remove anything yourself."