Skip to content

ntfs-du: find large files on NTFS partitions on Windows#560

Open
clarkb7 wants to merge 7 commits into
mainfrom
branden.clark/ntfs-du
Open

ntfs-du: find large files on NTFS partitions on Windows#560
clarkb7 wants to merge 7 commits into
mainfrom
branden.clark/ntfs-du

Conversation

@clarkb7

@clarkb7 clarkb7 commented Jul 20, 2026

Copy link
Copy Markdown

What does this PR do?

Add ntfs-du, a Windows only built-in that can quickly find large files to provide narrow down where to free up disk space.

Add platformBuiltins(), registers platform specific built-ins and keeps the commands out of the help list on other platforms.

Motivation

https://datadoghq.atlassian.net/browse/WINA-2573

A Windows-only complement to the du built-in, which is too slow on Windows to scan an entire drive.
ntfs-du reads the NTFS MFT directly which can process a terabyte drive in seconds.
trade-offs:

  • Requires Administrator privileges
  • Only works on NTFS partitions
  • Higher memory usage (~100MB for a full 1TB drive)

Testing

Includes unit tests, pentests, and fuzz tests for the NTFS MFT parser.
Includes integration tests, not run by default because they require Administrator privileges and a NTFS partition, host-based E2E tests will be needed.
Does NOT include scenario tests, because those are currently run on all platforms and this is Windows only, and the command has additional requirements: Administrator privileges and a NTFS partition

Checklist

  • Tests added/updated
  • Documentation updated (if applicable)

@clarkb7
clarkb7 force-pushed the branden.clark/ntfs-du branch from 360aff1 to 5937369 Compare July 20, 2026 20:41
@clarkb7
clarkb7 marked this pull request as ready for review July 20, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant