PowerShell port of the original Bash large-files finder.
Recursively scans a directory (and its subdirectories), prunes ignored paths exactly like the Bash version (including .gitignore + command-line --ignore patterns + .git), then lists the top N largest files with human-readable sizes (B / KB / MB / GB).
Identical behavior to the Bash script you provided:
- Same argument parsing
- Same
.gitignoreparsing rules (skip empty lines/comments, trim, remove trailing/) - Same prune semantics (
-namefor wildcards,-path "*/pat"+-path "*/pat/*"for directories) - Same output formatting and column alignment
- Same silent error handling (
2>/dev/null→-ErrorAction SilentlyContinue)