pdu(1)
π pdu(1) β the disk usage glow-up manual π
okay so bestie, welcome to the pdu page π¦ this is the General Commands Manual entry and we're literally about to make disk usage make sense. periodt.
β¨ NAME β¨
pdu β Summarize disk usage of the set of files, recursively for directories.
it's giving "your filesystem but make it a chart" and honestly? iconic. πΈ
π SYNOPSIS π
pdu [--json-input] [--json-output] [-b|--bytes-format BYTES_FORMAT]
[-H|--deduplicate-hardlinks] [-x|--one-file-system] [--top-down]
[--align-right] [-q|--quantity QUANTITY] [-d|--max-depth MAX_DEPTH]
[-w|--total-width TOTAL_WIDTH] [--column-width TREE_WIDTH BAR_WIDTH]
[-m|--min-ratio MIN_RATIO] [--no-sort] [-s|--silent-errors]
[-p|--progress] [--threads THREADS] [--omit-json-shared-details]
[--omit-json-shared-summary] [-h|--help] [-V|--version] [FILES]...
lowkey a lot of flags but we'll get through it together, i promise π«Ά
π DESCRIPTION π
Summarize disk usage of the set of files, recursively for directories.
Copyright: Apache-2.0 Β© 2021 HoΓ ng VΔn KhαΊ£i <https://github.com/KSXGitHub/> Sponsor: https://github.com/sponsors/KSXGitHub
ngl the copyright line is giving main character legal energy and we respect it π
π OPTIONS π
[FILES]...β List of files and/or directories. like, the stuff you actually wanna stare at in chart form π--json-inputβ Read JSON data from stdin. it's eating from the JSON bowl instead of the filesystem, iykyk π
π¨ Cannot be used with--deduplicate-hardlinks,--one-file-system,--quantity. pick a lane bestie, you can't have both.
--json-outputβ Print JSON data instead of an ASCII chart. for when you want the data raw and unfiltered, no cap π-b,--bytes-format <BYTES_FORMAT>[default: metric]β How to display the numbers of bytes. the three moods of byte-sizing:--bytes-format plainβ Display plain number of bytes without units. just the number, nothing else, no thoughts head empty π’--bytes-format metricβ Use metric scale, i.e.1K = 1000B,1M = 1000K, and so on. the base-10Β³ slay β¨--bytes-format binaryβ Use binary scale, i.e.1K = 1024B,1M = 1024K, and so on. base-2ΒΉβ° but make it cute π»
-H,--deduplicate-hardlinks,--detect-links,--dedupe-linksβ Detect and subtract the sizes of hardlinks from their parent directory totals. so your hardlinks stop double-counting like they're trying to be in two group chats at once π three aliases, one vibe, we love a multihyphenate.
π¨ Cannot be used with --json-input. fr fr.
-x,--one-file-systemβ Skip directories on different filesystems. stay in your lane, other filesystems, this chart is exclusive π
π¨ Cannot be used with --json-input. noted.
--top-downβ Print the tree top-down instead of bottom-up. flip the whole aesthetic, root at the top like a lil family tree π--align-rightβ Set the root of the bars to the right. bars grow leftward, it's giving mirror selfie πͺ-q,--quantity <QUANTITY>[default: block-size]β Aspect of the files/directories to be measured. like, what are we even measuring bestie:--quantity apparent-sizeβ Measure apparent sizes. the ~vibes~ size, what it looks like on paper π--quantity block-sizeβ Measure block sizes (block-count * 512B). the actual disk footprint, the real real π--quantity block-countβ Count numbers of blocks. just the blocks, no bytes attached, minimalism π’
π¨ Cannot be used with --json-input. we been knew.
-d,--max-depth,--depth <MAX_DEPTH>[default: 10]β Maximum depth to display the data. Could be either"inf"or a positive integer. go"inf"if you're feeling unhinged and fearless, or a cute lil number if you need boundaries πΈ-w,--total-width,--width <TOTAL_WIDTH>β Width of the visualization. make it as wide as your terminal crush π
π¨ Cannot be used with --column-width. it's one or the other, babe.
--column-width <TREE_WIDTH> <BAR_WIDTH>β Maximum widths of the tree column and width of the bar column. two numbers, two columns, chef's kiss π€
π¨ Cannot be used with --total-width. again: pick one. π
-m,--min-ratio <MIN_RATIO>[default: 0.01]β Minimal size proportion required to appear. the bouncer at the club, tiny files not on the list can't get in π«--no-sortβ Do not sort the branches in the tree. chaos mode: engaged. the tree is in its natural order, no editorializing π-s,--silent-errors,--no-errorsβ Prevent filesystem error messages from appearing in stderr. shhh bestie, the errors are sleeping π΄ two aliases, zero drama.-p,--progressβ Report progress being made at the expense of performance. you get the little progress crumbs but you pay for them in speed, trade-offs are real π--threads <THREADS>[default: auto]β Set the maximum number of threads to spawn. Could be either"auto","max", or a positive integer. letpdudecide ("auto"), go feral ("max"), or pick your own number, you're the boss π--omit-json-shared-detailsβ Do not output.shared.detailsin the JSON output. bye bye details node, you will not be missed π--omit-json-shared-summaryβ Do not output.shared.summaryin the JSON output. summary? never heard of her π-h,--helpβ Print help (see a summary with-h). the classic "help me help you" moment π«Ά-V,--versionβ Print version. know the vibe you're running π
π¦ EXAMPLES π¦
Show disk usage chart of current working directory
$ pdu
the "what is even in this folder" starter pack π
Show disk usage chart of a single file or directory
$ pdu path/to/file/or/directory
one target, one chart, laser focus β¨
Compare disk usages of multiple files and/or directories
$ pdu file.txt dir/
putting them side by side like it's a makeover episode π
Show chart in apparent sizes instead of block sizes
$ pdu --quantity=apparent-size
what it says it is vs what it actually is, we chose the first one π
Detect and subtract the sizes of hardlinks from their parent nodes
$ pdu --deduplicate-hardlinks
no double-counting, no cap π₯
Show sizes in plain numbers instead of metric units
$ pdu --bytes-format=plain
just a number, raw and honest π’
Show sizes in base 2ΒΉβ° units (binary) instead of base 10Β³ units (metric)
$ pdu --bytes-format=binary
binary bestie behavior π»
Show disk usage chart of all entries regardless of size
$ pdu --min-ratio=0
no bouncer, everyone gets in, absolute chaos and i love it π
Only show disk usage chart of entries whose size is at least 5% of total
$ pdu --min-ratio=0.05
the 5%-and-up VIP section π
Show disk usage data as JSON instead of chart
$ pdu --min-ratio=0 --max-depth=inf --json-output | jq
chart who? we're doing pipes and jq now, tech icon behavior π§
Visualize existing JSON representation of disk usage data
$ pdu --json-input < disk-usage.json
round two: this time the JSON is the input, slay π
β VERSION β
v0.24.0
and that's the whole page bestie, you ate that π«Άπ
pdu 0.24.0 β General Commands Manual β dated right there in the footer, so when you're citing this masterpiece just know it's the pdu 0.24.0 era πβ¨
π¦ where this page comes from
- nixpkgs unstable: parallel-disk-usage 0.24.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms