Skip to content

Latest commit

 

History

History
208 lines (132 loc) · 4.64 KB

File metadata and controls

208 lines (132 loc) · 4.64 KB

Usage

pdu [OPTIONS] [FILES]...

Arguments

  • [FILES]...: List of files and/or directories.

Options

--json-input

Read JSON data from stdin.

--json-output

Print JSON data instead of an ASCII chart.

--bytes-format

  • Aliases: -b.
  • Default: metric.
  • Choices:
    • plain: Display plain number of bytes without units
    • metric: Use metric scale, i.e. 1K = 1000B, 1M = 1000K, and so on
    • binary: Use binary scale, i.e. 1K = 1024B, 1M = 1024K, and so on

How to display the numbers of bytes.

--deduplicate-hardlinks

  • Aliases: -H, --detect-links, --dedupe-links.

Detect and subtract the sizes of hardlinks from their parent directory totals.

--top-down

Print the tree top-down instead of bottom-up.

--align-right

Set the root of the bars to the right.

--quantity

  • Aliases: -q.
  • Default: block-size.
  • Choices:
    • apparent-size: Measure apparent sizes
    • block-size: Measure block sizes (block-count * 512B)
    • block-count: Count numbers of blocks

Aspect of the files/directories to be measured.

--max-depth

  • Aliases: -d, --depth.
  • Default: 10.

Maximum depth to display the data. Could be either "inf" or a positive integer.

--total-width

  • Aliases: -w, --width.

Width of the visualization.

--column-width

Maximum widths of the tree column and width of the bar column.

--min-ratio

  • Aliases: -m.
  • Default: 0.01.

Minimal size proportion required to appear.

--no-sort

Do not sort the branches in the tree.

--silent-errors

  • Aliases: -s, --no-errors.

Prevent filesystem error messages from appearing in stderr.

--progress

  • Aliases: -p.

Report progress being made at the expense of performance.

--threads

  • Default: auto.

Set the maximum number of threads to spawn. Could be either "auto", "max", or a positive integer.

--omit-json-shared-details

Do not output .shared.details in the JSON output.

--omit-json-shared-summary

Do not output .shared.summary in the JSON output.

--help

  • Aliases: -h.

Print help.

--version

  • Aliases: -V.

Print version.

Examples

Show disk usage chart of current working directory

pdu

Show disk usage chart of a single file or directory

pdu path/to/file/or/directory

Compare disk usages of multiple files and/or directories

pdu file.txt dir/

Show chart in apparent sizes instead of block sizes

pdu --quantity=apparent-size

Detect and subtract the sizes of hardlinks from their parent nodes

pdu --deduplicate-hardlinks

Show sizes in plain numbers instead of metric units

pdu --bytes-format=plain

Show sizes in base 2¹⁰ units (binary) instead of base 10³ units (metric)

pdu --bytes-format=binary

Show disk usage chart of all entries regardless of size

pdu --min-ratio=0

Only show disk usage chart of entries whose size is at least 5% of total

pdu --min-ratio=0.05

Show disk usage data as JSON instead of chart

pdu --min-ratio=0 --max-depth=inf --json-output | jq

Visualize existing JSON representation of disk usage data

pdu --json-input < disk-usage.json